Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Content Approval / Workflow


Reply


4 Posts   2431 Views

Avatar
jimbomaha

3 Posts

23 June 2008 at 7:23pm

Hi,

I'm currently working on a site where the client needs to have a workflow/content approval process. So a user/group can edit content but can only save, not publish the content to the live site.

Then another user/group (admin/editor) would be able to approve the content and publish.

I've heard that this feature is built into silverstripe, but I can't find a way of implementing it, or documentation on this feature?

Is this something that is built into silverstripe? And if so, how is the workflow/content approval done?

Thanks!

James

Avatar
simon_w

Forum Moderator, 474 Posts

23 June 2008 at 7:34pm

The ability to do this is in SilverStripe. You'll want to declare canPublish() in your Page class with something similar to:

function canPublish() {
   return Permission::check('ADMIN');
}


Which would only allow an admin to publish a page, but any other group can still edit it.

Avatar
jimbomaha

3 Posts

24 June 2008 at 1:04am

Thanks simon, this may sound like a really stupid question...but where would I edit this file?

Avatar
adiwidjaja

Community Member, 14 Posts

24 June 2008 at 1:11am

That's in mysite/code/Page.php.

Cheers,

Andy