mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
mlanthaler: Bugfix: Permission::check() didn't pass $strict to Permission::checkMember().
(merged from branches/gsoc) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@42072 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
670694357f
commit
b888de3ced
@ -62,7 +62,8 @@ class Permission extends DataObject {
|
|||||||
* disabled, TRUE will be returned if the permission does
|
* disabled, TRUE will be returned if the permission does
|
||||||
* not exist at all.
|
* not exist at all.
|
||||||
*/
|
*/
|
||||||
static function check($code, $arg = "any", $memberID = null, $strict = true) {
|
static function check($code, $arg = "any", $memberID = null,
|
||||||
|
$strict = true) {
|
||||||
if(!$memberID) {
|
if(!$memberID) {
|
||||||
if(!Member::currentUser()) {
|
if(!Member::currentUser()) {
|
||||||
return false;
|
return false;
|
||||||
@ -70,7 +71,7 @@ class Permission extends DataObject {
|
|||||||
$memberID = Member::currentUserID();
|
$memberID = Member::currentUserID();
|
||||||
}
|
}
|
||||||
|
|
||||||
return self::checkMember($memberID, $code, $arg);
|
return self::checkMember($memberID, $code, $arg, $strict);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user