Skip to content

Commit

Permalink
Removed redirect for non admin moderators trying to access runs/surveys
Browse files Browse the repository at this point in the history
  • Loading branch information
Epd02 committed Feb 18, 2024
1 parent 1cfaba5 commit 607cea2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion application/Controller/AdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,9 @@ protected function header() {

$this->user = new User($cookie[0], $cookie[1]);

if (!$this->user->isAdmin()) {
$run_or_survey = str_contains($_SERVER['REQUEST_URI'], 'run') || str_contains($_SERVER['REQUEST_URI'], 'survey');

if (!$this->user->isAdmin() && ($this->user->moderator_for==0 || !$run_or_survey)) {

This comment has been minimized.

Copy link
@till-20

till-20 Feb 18, 2024

after that clicking reroutes to run, still no permission

$docLink = site_url('documentation/#get_started');
alert('You need to request for an admin account in order to access this section. <a href="'.$docLink.'">See Documentation</a>.', 'alert-warning');
$this->request->redirect('admin/account');
Expand Down

0 comments on commit 607cea2

Please sign in to comment.