mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
ENHANCEMENT: Let LeftAndMain subclass canView() methods optionally redirect. (from r90018)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.4@96800 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
58534f76c5
commit
0ee53df7a6
@ -118,7 +118,8 @@ class LeftAndMain extends Controller {
|
||||
}
|
||||
|
||||
// Allow customisation of the access check by a decorator
|
||||
if(!$this->canView()) {
|
||||
// Also all the canView() check to execute Director::redirect()
|
||||
if(!$this->canView() && !$this->response->isFinished()) {
|
||||
// When access /admin/, we should try a redirect to another part of the admin rather than be locked out
|
||||
$menu = $this->MainMenu();
|
||||
foreach($menu as $candidate) {
|
||||
|
Loading…
Reference in New Issue
Block a user