mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
#1488 - Access to 'logged in' users for home page fails (attempts to redirect to Security/login forever)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.1.1@43530 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
657916aad1
commit
126d6ebbf4
@ -86,7 +86,7 @@ class ContentController extends Controller {
|
||||
Director::set_site_mode('site');
|
||||
|
||||
// Check permissions
|
||||
if($this->dataRecord && !$this->dataRecord->can('View')) {
|
||||
if($this->dataRecord && $this->URLSegment != 'Security' && !$this->dataRecord->can('View')) {
|
||||
Security::permissionFailure($this);
|
||||
}
|
||||
}
|
||||
|
@ -291,6 +291,7 @@ class SiteTree extends DataObject {
|
||||
break;
|
||||
case 'view':
|
||||
case 'view_page':
|
||||
if(!$this->Viewers) return true; // If Viewers isn't set, then assume it is Anyone
|
||||
if($this->Viewers == 'Anyone') return true;
|
||||
if($member && $this->Viewers == 'LoggedInUsers') return true;
|
||||
if($member && $this->Viewers == 'OnlyTheseUsers' && $member->isInGroup($this->ViewersGroup)) return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user