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:
Ingo Schommer 2010-05-25 04:12:51 +00:00
parent a1d9d8b890
commit 593448929a

View File

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