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.

All other Modules /

Discuss all other Modules here.

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

Permissions to add/edit modeladmin components


Go to End


2 Posts   1771 Views

Avatar
Laurie

Community Member, 21 Posts

4 June 2010 at 2:07pm

I'm running 2.4.0 + cmsworkflow + dataobject_manager.

I've added several classes that extend ModelAdmin...so far, so good.

However, I'd like to allow roles other than admin (like publisher and author) to add and edit items defined by the ModelAdmin classes I've created.

I've ticked the "Access to 'xxx' section" on the roles tab of the security section...and this allows other user to search and view items, but not add or edit. What other item(s) need to be ticked to enable other users to add and edit items? Or is there some other way that this needs to be done?

Many thanks.

Cheers,
Laurie

Avatar
swaiba

Forum Moderator, 1899 Posts

16 June 2010 at 3:52am

Hi,

overriding the folwoing functions to true works...

	function canCreate() {return true;}
	function canEdit() {return true;}
	function canDelete() {return true;}

Barry