Skip to content

Commit

Permalink
Fixed issue #16573: Others than the survey owners are not allowed to …
Browse files Browse the repository at this point in the history
…edit questions anymore (#1547)

Dev: actionGetQuestionPermissions was checking the 'survey' permission instead of 'surveycontent'.
  • Loading branch information
gabrieljenik committed Aug 19, 2020
1 parent 3712854 commit 9d09607
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions application/controllers/QuestionEditorController.php
Expand Up @@ -585,11 +585,11 @@ public function actionGetQuestionPermissions($iQuestionId = null)
$oQuestion = $this->getQuestionObject($iQuestionId);

$aPermissions = [
"read" => Permission::model()->hasSurveyPermission($oQuestion->sid, 'survey', 'read'),
"update" => Permission::model()->hasSurveyPermission($oQuestion->sid, 'survey', 'update'),
"read" => Permission::model()->hasSurveyPermission($oQuestion->sid, 'surveycontent', 'read'),
"update" => Permission::model()->hasSurveyPermission($oQuestion->sid, 'surveycontent', 'update'),
"editorpreset" => App()->session['htmleditormode'],
"script" =>
Permission::model()->hasSurveyPermission($oQuestion->sid, 'survey', 'update')
Permission::model()->hasSurveyPermission($oQuestion->sid, 'surveycontent', 'update')
&& SettingsUser::getUserSetting('showScriptEdit', App()->user->id),
];

Expand Down

0 comments on commit 9d09607

Please sign in to comment.