Skip to content

Commit

Permalink
Fixed issue #18544: Update Theme Options: Survey Group permissions ar…
Browse files Browse the repository at this point in the history
…e not checked correctly (#2795)

Co-authored-by: lapiudevgit <devgit@lapiu.biz>
  • Loading branch information
gabrieljenik and lapiudevgit committed Jan 12, 2023
1 parent f88ecbd commit 3821109
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions application/controllers/ThemeOptionsController.php
Expand Up @@ -367,8 +367,8 @@ public function actionUpdateSurveyGroup(int $id = null, int $gsid, $l = null)
if (empty($gsid)) {
throw new CHttpException(403, gT("You do not have permission to access this page."));
}
$oSurveysInGroup = SurveysInGroup::model()->findByPk($gsid);
if (empty($oSurveysInGroup) && !$oSurveysInGroup->hasPermission('surveys', 'update')) {
$oSurveysGroups = SurveysGroups::model()->findByPk($gsid);
if (empty($oSurveysGroups) || !$oSurveysGroups->hasPermission('surveysettings', 'update')) {
throw new CHttpException(403, gT("You do not have permission to access this page."));
}
}
Expand Down Expand Up @@ -623,8 +623,8 @@ public function actionReset(int $gsid)
if (empty($gsid)) {
throw new CHttpException(403, gT("You do not have permission to access this page."));
}
$oSurveysInGroup = SurveysInGroup::model()->findByPk($gsid);
if (empty($oSurveysInGroup) && !$oSurveysInGroup->hasPermission('surveys', 'update')) {
$oSurveysGroups = SurveysGroups::model()->findByPk($gsid);
if (empty($oSurveysGroups) || !$oSurveysGroups->hasPermission('surveysettings', 'update')) {
throw new CHttpException(403, gT("You do not have permission to access this page."));
}
}
Expand Down

0 comments on commit 3821109

Please sign in to comment.