Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
* develop:
  additional user check
  • Loading branch information
chfsx committed Feb 26, 2016
2 parents 573177a + 7aec512 commit d4c8641
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions classes/class.usrtoHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ public static function getInstance() {
/**
* @var int
*/
protected $original_usr_id = 6;
protected $original_usr_id = 0;
/**
* @var int
*/
protected $temporary_usr_id = 6;
protected $temporary_usr_id = 0;


/**
Expand Down Expand Up @@ -125,7 +125,7 @@ public function switchBack() {
protected function checkAccess($usr_id) {
global $rbacreview;
$pl = ilUserTakeOverPlugin::getInstance();
if (!isset($usr_id) || !in_array(2, $rbacreview->assignedGlobalRoles($usr_id))) {
if (!isset($usr_id) || $usr_id == 13 || !in_array(2, $rbacreview->assignedGlobalRoles($usr_id))) {
ilUtil::sendFailure($pl->txt('no_permission'), true);
ilUtil::redirect('login.php');

Expand Down

0 comments on commit d4c8641

Please sign in to comment.