mirror of
https://github.com/silverstripe/silverstripe-subsites
synced 2024-10-22 09:05:55 +00:00
Removed redirection to the tab that this user has access to; it was causing an infinite loop with 2.3
This commit is contained in:
parent
9413bee324
commit
6537535da2
@ -107,15 +107,6 @@ class LeftAndMainSubsites extends Extension {
|
|||||||
if($result = Permission::check("CMS_ACCESS_$className")) {
|
if($result = Permission::check("CMS_ACCESS_$className")) {
|
||||||
return $result;
|
return $result;
|
||||||
} else {
|
} else {
|
||||||
if($className == 'CMSMain') {
|
|
||||||
// When access /admin/, we should try a redirect to another part of the admin rather than be locked out
|
|
||||||
$menu = $this->owner->MainMenu();
|
|
||||||
if(($first = $menu->First()) && $first->Link) {
|
|
||||||
Director::redirect($first->Link);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$otherSites = Subsite::accessible_sites("CMS_ACCESS_$className");
|
$otherSites = Subsite::accessible_sites("CMS_ACCESS_$className");
|
||||||
if($otherSites && $otherSites->TotalItems() > 0) {
|
if($otherSites && $otherSites->TotalItems() > 0) {
|
||||||
$otherSites->First()->activate();
|
$otherSites->First()->activate();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user