#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:
Andrew O'Neil 2007-10-17 22:18:34 +00:00 committed by Sam Minnee
parent 657916aad1
commit 126d6ebbf4
2 changed files with 2 additions and 1 deletions

View File

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

View File

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