mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
Support for new DataObject->can() signature
Cherry pick from https://github.com/silverstripe/silverstripe-cms/pull/1435 in order to get CMS loading again.
This commit is contained in:
parent
5852cd56a5
commit
5a7b7084ff
@ -762,7 +762,7 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
||||
* @param Member $member The member whose permissions need checking. Defaults to the currently logged in user.
|
||||
* @return bool True if the the member is allowed to do the given action
|
||||
*/
|
||||
public function can($perm, $member = null) {
|
||||
public function can($perm, $member = null, $context = array()) {
|
||||
if(!$member || !(is_a($member, 'Member')) || is_numeric($member)) {
|
||||
$member = Member::currentUserID();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user