Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixes cascading permissions display/selection issue with user/group p…

…ermissions, we weren't cascading through pages/containers
  • Loading branch information...
commit 840df401e1761fdd38f589f7f3f4bf8e4fae8a2e 1 parent 0fdb121
@dleffler dleffler authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 framework/core/subsystems/expPermissions.php
View
8 framework/core/subsystems/expPermissions.php
@@ -228,7 +228,7 @@ public static function checkUser($user,$permission,$location,$explicitOnly = fal
// exit recursive calls for globally scoped modules
$module_scope['error'] = false;
- if (!empty($module_scope[$location->src][$location->mod]->scope)) { // is this the main container?
+ if (!empty($location->src) && !empty($module_scope[$location->src][$location->mod]->scope)) { // is this the main container?
$rLoc = $db->selectObject("sectionref","source='" . $location->src . "' AND module='" . $location->mod . "'");
if (!empty($rLoc) && $rLoc->refcount == 1000 && $module_scope[$location->src][$location->mod]->scope == 'global') {
$module_scope['error'] = true;
@@ -274,7 +274,7 @@ public static function checkUser($user,$permission,$location,$explicitOnly = fal
// if this is the global sidebar, then exit since we don't care about page permissions
$module_scope['error'] = false;
- if (!empty($module_scope[$location->src][$location->mod]->scope)) { // is this the main container?
+ if (!empty($location->src) && !empty($module_scope[$location->src][$location->mod]->scope)) { // is this the main container?
$rLoc = $db->selectObject("sectionref","source='" . $location->src . "' AND module='" . $location->mod . "'");
if (!empty($rLoc) && $rLoc->refcount == 1000 && @$module_scope[$location->src][$location->mod]->scope == 'global') {
$module_scope['error'] = true;
@@ -360,7 +360,7 @@ public static function checkGroup($group,$permission,$location,$explicitOnly = f
// exit recursive calls for globally scoped modules
$module_scope['error'] = false;
- if (!empty($module_scope[$location->src][$location->mod]->scope)) { // is this the main container?
+ if (!empty($location->src) && !empty($module_scope[$location->src][$location->mod]->scope)) { // is this the main container?
$rLoc = $db->selectObject("sectionref","source='" . $location->src . "' AND module='" . $location->mod . "'");
if (!empty($rLoc) && $rLoc->refcount == 1000 && $module_scope[$location->src][$location->mod]->scope == 'global') {
$module_scope['error'] = true;
@@ -406,7 +406,7 @@ public static function checkGroup($group,$permission,$location,$explicitOnly = f
// if this is the global sidebar, then exit since we don't care about page permissions
$module_scope['error'] = false;
- if (!empty($module_scope[$location->src][$location->mod]->scope)) { // is this the main container?
+ if (!empty($location->src) && !empty($module_scope[$location->src][$location->mod]->scope)) { // is this the main container?
$rLoc = $db->selectObject("sectionref","source='" . $location->src . "' AND module='" . $location->mod . "'");
if (!empty($rLoc) && $rLoc->refcount == 1000 && @$module_scope[$location->src][$location->mod]->scope == 'global') {
$module_scope['error'] = true;
Please sign in to comment.
Something went wrong with that request. Please try again.