mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
API CHANGE Always allow users with ADMIN permissions to view or edit SiteConfig
git-svn-id: http://svn.silverstripe.com/modules/sapphire/branches/airnz/iteration3@89049 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
04df9177dd
commit
e57be3f6e4
@ -217,6 +217,8 @@ class SiteConfig extends DataObject implements PermissionProvider {
|
||||
if(!$member) $member = Member::currentUserID();
|
||||
if($member && is_numeric($member)) $member = DataObject::get_by_id('Member', $member);
|
||||
|
||||
if ($member && Permission::checkMember($member, "ADMIN")) return true;
|
||||
|
||||
if (!$this->CanViewType || $this->CanViewType == 'Anyone') return true;
|
||||
|
||||
// check for any logged-in users
|
||||
@ -240,6 +242,8 @@ class SiteConfig extends DataObject implements PermissionProvider {
|
||||
if(!$member) $member = Member::currentUserID();
|
||||
if($member && is_numeric($member)) $member = DataObject::get_by_id('Member', $member);
|
||||
|
||||
if ($member && Permission::checkMember($member, "ADMIN")) return true;
|
||||
|
||||
// check for any logged-in users
|
||||
if(!$this->CanEditType || $this->CanEditType == 'LoggedInUsers' && $member) return true;
|
||||
|
||||
@ -273,6 +277,8 @@ class SiteConfig extends DataObject implements PermissionProvider {
|
||||
|
||||
if (Permission::check('ADMIN')) return true;
|
||||
|
||||
if ($member && Permission::checkMember($member, "ADMIN")) return true;
|
||||
|
||||
// check for any logged-in users
|
||||
if($this->CanCreateTopLevelType == 'LoggedInUsers' && $member) return true;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user