mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX: Make sure findAnAdministrator gets a global administrator when subsites is installed. (from r94369)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@95603 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
69cda024ab
commit
298ef035ed
@ -611,7 +611,8 @@ class Security extends Controller {
|
||||
$permission = DataObject::get_one("Permission", "\"Code\" = 'ADMIN'", true, "\"Permission\".\"ID\"");
|
||||
|
||||
$adminGroup = null;
|
||||
if($permission) $adminGroup = DataObject::get_one("Group", "\"Group\".\"ID\" = '{$permission->GroupID}'", true, "\"Group\".\"ID\"");
|
||||
$subsiteCheck = class_exists('GroupSubsites') ? ' AND "Group"."SubsiteID" = 0' : '';
|
||||
if($permission) $adminGroup = DataObject::get_one("Group", "\"Group\".\"ID\" = '{$permission->GroupID}'$subsiteCheck", true, "\"Group\".\"ID\"");
|
||||
|
||||
if($adminGroup) {
|
||||
if($adminGroup->Members()->First()) {
|
||||
|
Loading…
Reference in New Issue
Block a user