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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Archive /

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

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

Content Approval / Workflow


Go to End


4 Posts   3093 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
(deleted)

Community Member, 473 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