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.

Customising the CMS /

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

"Add new" button still displays when action set as forbidden


Go to End


3 Posts   1246 Views

Avatar
acoggins

Community Member, 19 Posts

21 February 2015 at 6:50pm

Edited: 21/02/2015 6:52pm

I'm looking to simplify the backend for users. My editors will have the ability to edit existing pages but not create any new ones.

When I set this up though, the user is still shown a tempting green "Add new" button at the top of the page. When they click this it seems to work and takes them on to an "add page" dialogue where they can make some choices, and finally when they click "Create" they eventually get a message saying "Forbidden".

I can't see why we are giving users a button that leads to a forbidden action. Is there some way to remove this for my editors?

Avatar
acoggins

Community Member, 19 Posts

22 February 2015 at 11:19am

Edited: 24/02/2015 9:34am

OK... I have found a solution. I used this neat little extension that hides the history tab, and I've just extended the functions that were blocked:

https://github.com/g4b0/silverstripe-hide-history

I am now using it to load a modified css file for everyone except admin. General users no longer see the history tab, the "add new" button, the "edit tree" button and the "multi-selection" button.

Avatar
acoggins

Community Member, 19 Posts

23 February 2015 at 5:36pm

Edited: 25/02/2015 7:11pm

I ended up using a combination of approaches. I had been modifying the side menu by adding items and changing the styling with css. So I decided to just set up an "add new page" link on the side menu where it only displays for me. Then I have removed all the unnecessary buttons on the main panel.

In case anyone's interested, I've attached some images to show how my simplified CMS looks for the user and the admin.

On the side menu I have added a link to view the site, and also links to email us directly for support or go to our website. I can set the main colours of the cms to tie in with the front end theme.

Attached Files