Skip to content

Commit

Permalink
Fix #532 permission issue when re-add user
Browse files Browse the repository at this point in the history
  • Loading branch information
xcompass committed Oct 5, 2016
1 parent 6fa2963 commit 1fc3c5f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/users_controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@ public function readd($username, $courseId = null)
$url = '/users';
$url .= $courseId ? '/goToClassList/'.$courseId : '';

if ($userRole <= $roleId || !in_array($userRole, array(4, 5))) {
if ($roleId != 1 && ($userRole <= $roleId || !in_array($userRole, array(3, 4, 5)))) {
$this->Session->setFlash(__('Error: You do not have permission to readd this user.', true));
$this->redirect($url);
return;
Expand Down

0 comments on commit 1fc3c5f

Please sign in to comment.