Search

Hi everybody,

With the members extension, how do you deny access to certain pages for different member roles?

I have tried to set 'deny access' to pages on a role in the 'member roles' part of the system folder, but when I use a user name which has been set up with this role, I can still get access to the page which I had previously denied access to.

I have used the 'author roles' Extension on the backend and this works like a dream.

Any suggesting on what I am doing wrong?

Chris

Are you loggend in as a Symphony author as well? With a session in the backend no Members settings apply. So you'd have to check in another browser.

Just tried on another browser and 'access denied' appeared. Thanks, it was me being stupid. By the way, would there be anyway to automatically removing from the navigation bar any nav links to a page which a member has 'denied access' to, once they have signed in?

I'm new to trying 'backend development' and still struggling with grasping the concept.

Thanks.

The easiest way would be to add a page types with the member roles names to the pages. The page type gets added to the navigation data source, so you can filter by that. But this of course means some duplication.

But if you are comfortable with some PHP you could have a look at the navigation datasource class and build a custom navigation datasource that JOINs to the members roles page permissions table in its query and adds this information to the XML.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details