17488 Posts in 4473 Topics by 1978 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1159 Views |
-
Publish Permissions

8 October 2008 at 5:28am Last edited: 8 October 2008 5:32am
Hi - I thought this is basic CMS requirements - so maybe I'm missing something.
I need to create a group (say Editors) that can only Create/Add/Update pages - not publish.
Only the administrator has the right to publish to the live site.How is this accomplished ?
Based on an earlier post to the forum, I tried to add the canPublish function to the Page_controller class without success :
protected $publisherGroups = array(
"Administrators"
);function canPublish() {
$member = Member::currentUser();
return $member->inGroups($this->publisherGroups);
}Thanks - impressed with SilverStripe so far.
I'm comparing with TypoLight and BigMedium. -
Re: Publish Permissions

10 November 2008 at 3:49am
Hi there, sorry for the late answer. We've done a bit of work lately to better enforce the SiteTree->can*() permissions in the CMS-Controllers, which is going to be released with 2.3 soon. Sam is also working on a basic workflow module, you can check its progress here: http://open.silverstripe.com/browser/modules/cmsworkflow/trunk
As a sidenote, we usually check against permission codes rather than groups directly. So your canPublish() logic could also be implemented like so:
function canPublish($member = null) {
return Permission::checkMember($member, 'ADMIN');
}With the PermissionProvider interface, you can add your own permission codes for a more flexible management.
| 1159 Views | ||
|
Page:
1
|
Go to Top |


