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.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Assign Permissions on Content Creation?


Go to End


2 Posts   1007 Views

Avatar
ttyl

Community Member, 114 Posts

21 November 2009 at 8:47am

Hi,

If a user is logged in and creates a new page is it possible to automatically set the access permissions for that page to the group(s) they belong to?

Avatar
dalesaurus

Community Member, 283 Posts

26 November 2009 at 5:03am

You can access the onAfterWrite() function to run this code, or grab the latestPublished() version and ensure it has the permissions you want.