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

Feature Request -> Hide a page from certain groups


Go to End


3 Posts   1054 Views

Avatar
JonShutt

Community Member, 244 Posts

27 February 2015 at 4:52am

There is a nice an easy way of allowing access of a page to people in certain groups, but on a site I'm working on I've got a case where I want to put a few members in to a new group, and give them access to a few extra pages, and hide a few page from them.

So, I needed a way of creating a list in the page called 'Hide Page From', where we could select groups. I achieved this pretty easily by overriding the canview() function, but I was wondering, is this a common enough situation to be built into the core?

Avatar
Pyromanik

Community Member, 419 Posts

27 February 2015 at 12:11pm

By default I don't think there is a way to explicitly deny members/groups/roles. The permissions system is additive, and so far as I know doesn't allow for exclusionary exceptions. Perhaps that's a good idea for a module! (although may need some core edits to cms...)

Avatar
JonShutt

Community Member, 244 Posts

27 February 2015 at 10:10pm

Hi, yes, it's probably something I could modulize... (modulificate... make into a module)