mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
DOCS Permission comments made a bit clearer
This commit is contained in:
parent
d64852b2e8
commit
ab0572e7cc
@ -163,8 +163,7 @@ class Permission extends DataObject implements TemplateGlobalProvider {
|
|||||||
$memberID = (is_object($member)) ? $member->ID : $member;
|
$memberID = (is_object($member)) ? $member->ID : $member;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If $admin_implies_all was false then this would be inefficient, but that's an edge
|
// Turn the code into an array as we may need to add other permsissions to the set we check
|
||||||
// case and this keeps the code simpler
|
|
||||||
if(!is_array($code)) $code = array($code);
|
if(!is_array($code)) $code = array($code);
|
||||||
|
|
||||||
if($arg == 'any') {
|
if($arg == 'any') {
|
||||||
@ -179,6 +178,8 @@ class Permission extends DataObject implements TemplateGlobalProvider {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// if ADMIN has all privileges, then we need to push that code in
|
||||||
if(Config::inst()->get('Permission', 'admin_implies_all')) $code[] = "ADMIN";
|
if(Config::inst()->get('Permission', 'admin_implies_all')) $code[] = "ADMIN";
|
||||||
|
|
||||||
// Multiple $code values - return true if at least one matches, ie, intersection exists
|
// Multiple $code values - return true if at least one matches, ie, intersection exists
|
||||||
|
Loading…
Reference in New Issue
Block a user