mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR can always create top level if admin (from r100511)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@105588 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
a1d9d8b890
commit
593448929a
@ -260,6 +260,8 @@ class SiteConfig extends DataObject {
|
|||||||
if(!$member || !(is_a($member, 'Member')) || is_numeric($member)) {
|
if(!$member || !(is_a($member, 'Member')) || is_numeric($member)) {
|
||||||
$member = Member::currentUserID();
|
$member = Member::currentUserID();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Permission::check('ADMIN')) return true;
|
||||||
|
|
||||||
// check for any logged-in users
|
// check for any logged-in users
|
||||||
if($this->CanCreateTopLevelType == 'LoggedInUsers' && $member) return true;
|
if($this->CanCreateTopLevelType == 'LoggedInUsers' && $member) return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user