lib: Fix User::can()

This commit is contained in:
Eric Lippmann 2015-02-02 13:44:54 +01:00
parent 9ac9342107
commit 94193abdc0
1 changed files with 2 additions and 4 deletions

View File

@ -428,11 +428,9 @@ class User
if ($wildcard !== false) {
if (substr($permission, 0, $wildcard) === substr($permitted, 0, $wildcard)) {
return true;
} else {
if ($permission === $permitted) {
return true;
}
}
} elseif ($permission === $permitted) {
return true;
}
}
return false;