silverstripe-cms/tests/php/Model/SiteTreePermissionsTest.yml

89 lines
3.1 KiB
YAML
Raw Normal View History

SilverStripe\SiteConfig\SiteConfig:
default:
Title: My test site
Tagline: There is no doubt this is a great test site
CanViewType: Anyone
CanEditType: LoggedInUsers
SilverStripe\Security\Permission:
cmsmain1:
Code: CMS_ACCESS_CMSMain
cmsmain2:
Code: CMS_ACCESS_CMSMain
grantaccess:
Code: SITETREE_GRANT_ACCESS
SilverStripe\Security\Group:
subadmingroup:
Title: Create, edit and delete pages
Code: subadmingroup
Permissions: =>SilverStripe\Security\Permission.cmsmain1,=>SilverStripe\Security\Permission.grantaccess
editorgroup:
Title: Edit existing pages
Code: editorgroup
Permissions: =>SilverStripe\Security\Permission.cmsmain2
websiteusers:
Title: View certain restricted pages
SilverStripe\Security\Member:
subadmin:
Email: subadmin@test.com
Password: test
Groups: =>SilverStripe\Security\Group.subadmingroup
editor:
Email: editor@test.com
Password: test
Groups: =>SilverStripe\Security\Group.editorgroup
websiteuser:
Email: websiteuser@test.com
Password: test
Groups: =>SilverStripe\Security\Group.websiteusers
SilverStripe\CMS\Model\SiteTree:
standardpage:
URLSegment: standardpage
restrictedViewLoggedInUsers:
CanViewType: LoggedInUsers
URLSegment: restrictedViewLoggedInUsers
restrictedViewOnlyWebsiteUsers:
CanViewType: OnlyTheseUsers
ViewerGroups: =>SilverStripe\Security\Group.websiteusers
URLSegment: restrictedViewOnlyWebsiteUsers
restrictedViewOnlySubadminGroup:
CanViewType: OnlyTheseUsers
ViewerGroups: =>SilverStripe\Security\Group.subadmingroup
URLSegment: restrictedViewOnlySubadminGroup
restrictedEditLoggedInUsers:
CanEditType: LoggedInUsers
URLSegment: restrictedEditLoggedInUsers
restrictedEditOnlySubadminGroup:
CanEditType: OnlyTheseUsers
EditorGroups: =>SilverStripe\Security\Group.subadmingroup
URLSegment: restrictedEditOnlySubadminGroup
inheritWithNoParent:
CanEditType: Inherit
CanViewType: Inherit
URLSegment: inheritWithNoParent
parent_restrictedViewOnlySubadminGroup:
CanViewType: OnlyTheseUsers
ViewerGroups: =>SilverStripe\Security\Group.subadmingroup
URLSegment: parent-restrictedViewOnlySubadminGroup
child_restrictedViewOnlySubadminGroup:
CanViewType: Inherit
Parent: =>SilverStripe\CMS\Model\SiteTree.parent_restrictedViewOnlySubadminGroup
URLSegment: child-restrictedViewOnlySubadminGroup
parent_restrictedEditOnlySubadminGroup:
CanEditType: OnlyTheseUsers
EditorGroups: =>SilverStripe\Security\Group.subadmingroup
URLSegment: parent-restrictedEditOnlySubadminGroup
child_restrictedEditOnlySubadminGroup:
CanEditType: Inherit
Parent: =>SilverStripe\CMS\Model\SiteTree.parent_restrictedEditOnlySubadminGroup
URLSegment: child-restrictedEditOnlySubadminGroup
deleteTestParentPage:
CanEditType: Inherit
URLSegment: deleteTestParentPage
deleteTestChildPage:
CanEditType: OnlyTheseUsers
EditorGroups: =>SilverStripe\Security\Group.subadmingroup
URLSegment: deleteTestChildPage
draftOnlyPage:
CanViewType: Anyone
URLSegment: draft-only