View Issue Details

This bug affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
06265Bug reportsOtherpublic2012-07-20 13:31
Reporterchoffman Assigned Toc_schmitz  
PrioritynormalSeveritypartial_block 
Status closedResolutionfixed 
Product Version2.00RC8 
Fixed in Version2.00RC7 
Summary06265: survey administrator cannot see new survey page
Description

I see a blank page when I am logged in as a survey administrator and try to create a survey (yes I checked this permission).

Steps To Reproduce

1) log in as survey admin
2) click plus sign for new survey
3) see nothing

TagsNo tags attached.
Bug heat4
Complete LimeSurvey version number (& build)
I will donate to the project if issue is resolved
Browser
Database type & version
Server OS (if known)
Webserver software & version (if known)
PHP Version

Users monitoring this issue

choffman

Activities

choffman

choffman

2012-06-25 16:18

reporter   ~19545

Hmm, looks like I may have found the culprit...

class SurveyAdmin extends Survey_Common_Action
{
/**

  • Initiates the survey action, checks for superadmin permission
  • @access public
  • @param CController $controller
  • @param string $id
  • @return void
    */
    public function construct($controller, $id)
    {
    parent::
    construct($controller, $id);

    if (Yii::app()->session['USER_RIGHT_SUPERADMIN'] != 1)
    {
        die();
    }

    }

choffman

choffman

2012-06-25 16:19

reporter   ~19546

Is there really no way to do declarative authorization in Yii? You have to resort to slapping conditionals into each action?

choffman

choffman

2012-06-25 16:54

reporter   ~19549

It looks like there is a role-based authorization component built into the framework: http://www.yiiframework.com/doc/guide/1.1/en/topics.auth#defining-authorization-hierarchy

choffman

choffman

2012-06-25 18:47

reporter   ~19551

I have submitted the following pull request with the fix I'm using:

https://github.com/LimeSurvey/LimeSurvey/pull/9

choffman

choffman

2012-06-25 22:52

reporter   ~19562

I didn't adequately check that pull request before sending it... Here is the corrected version:

https://github.com/LimeSurvey/LimeSurvey/pull/10

Issue History

Date Modified Username Field Change
2012-06-22 22:53 choffman New Issue
2012-06-22 22:59 choffman Issue Monitored: choffman
2012-06-25 16:18 choffman Note Added: 19545
2012-06-25 16:19 choffman Note Added: 19546
2012-06-25 16:54 choffman Note Added: 19549
2012-06-25 18:47 choffman Note Added: 19551
2012-06-25 22:52 choffman Note Added: 19562
2012-07-20 13:30 c_schmitz Project Development => Bug reports
2012-07-20 13:30 c_schmitz Category Survey Design => Other issues
2012-07-20 13:31 c_schmitz Status new => closed
2012-07-20 13:31 c_schmitz Assigned To => c_schmitz
2012-07-20 13:31 c_schmitz Resolution open => fixed
2012-07-20 13:31 c_schmitz Fixed in Version => 2.00RC7