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:
Sam Minnee 2009-02-12 03:40:26 +00:00
parent 9413bee324
commit 6537535da2

View File

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