Index: branches/5.0.x/core/units/helpers/permissions_helper.php =================================================================== diff -u -N -r12511 -r12726 --- branches/5.0.x/core/units/helpers/permissions_helper.php (.../permissions_helper.php) (revision 12511) +++ branches/5.0.x/core/units/helpers/permissions_helper.php (.../permissions_helper.php) (revision 12726) @@ -1,6 +1,6 @@ check by current (before editing started, saved in OnPreCreate event) category permissions // note: category in session is placed on catalog data import start - $category_id = $this->Application->IsAdmin() ? $this->Application->RecallVar('m_cat_id') : $this->Application->GetVar('m_cat_id'); + $category_id = $this->Application->isAdmin ? $this->Application->RecallVar('m_cat_id') : $this->Application->GetVar('m_cat_id'); } elseif ($top_prefix == 'c' || $top_prefix == 'st') { $category_id = $id; @@ -212,7 +212,7 @@ $new_item = false; } else { - $new_item = $this->Application->IsAdmin() && $event_handler->isNewItemCreate($event) ? true : false; + $new_item = $this->Application->isAdminUser && $event_handler->isNewItemCreate($event) ? true : false; $check_status = $this->checkCombinedPermissions($event, $owner_id, (int)$category_id, $new_item); } @@ -329,7 +329,7 @@ */ function CheckEventCategoryPermission(&$event, $event_perm_mapping) { - if (!$this->Application->IsAdmin()) { + if (!$this->Application->isAdmin) { // check front-end permission by old scheme return $this->_frontCheckEventCategoryPermission($event, $event_perm_mapping); } @@ -348,7 +348,7 @@ } // 1. most of events does require admin login only - $perm_status = $this->Application->LoggedIn() && $this->Application->IsAdmin(); + $perm_status = $this->Application->isAdminUser; // 2. in case, when event require more, then "view" right, then restrict it to temporary tables only if (!in_array('view', $check_perms)) { @@ -450,7 +450,7 @@ if (!$this->Application->LoggedIn()) { $redirect_template = array_key_exists('login_template', $params) ? $params['login_template'] : ''; - if (!$redirect_template && $this->Application->IsAdmin()) { + if (!$redirect_template && $this->Application->isAdmin) { $redirect_template = 'login'; } $redirect_params['next_template'] = $t; @@ -460,7 +460,7 @@ $redirect_template = $params['no_permissions_template']; } else { - $redirect_template = $this->Application->IsAdmin() ? 'no_permission' : $this->Application->ConfigValue('NoPermissionTemplate'); + $redirect_template = $this->Application->isAdmin ? 'no_permission' : $this->Application->ConfigValue('NoPermissionTemplate'); } if ($this->Application->isDebugMode()) {