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

Security on page creation by non admins.


Go to End


1359 Views

Avatar
micahsheets

Community Member, 165 Posts

22 November 2008 at 6:39am

I have a site where I want to have the list of available page types to be limited for any CMS users not in the Administrators group. My testing shows that setting:

static $can_create = false;

on a page type removes the page from both Administration and other users.

I found

static $need_permission
but cannot find documentation on how it works.

Also I found:

	// a list of groups that are permitted to create pages of this type.
	/*static $can_create = array(
		'Administrators'
	);*/

However putting this code, uncommented in my page type declaration doesn't make any difference.

I would like to limit page creation of all types to only Administrators in the SiteTree class and then allow certain pages to be created by Writers group memebers by setting the $can_create to true in my page types.