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:
Ingo Schommer 2007-09-16 14:37:21 +00:00
parent 670694357f
commit b888de3ced

View File

@ -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);
} }