I may have uncovered another bug. I am trying to achieve the following:

  • I have several custom roles: investor, representative, admin and support
  • investors/reps are common user roles, admin is for a small number of site officials, and support is a role for myself and Dylan to help set up, administer and support the site
  • I need to hide a subset of a 'help' book outline by role, using paths. Eg, only investors or 'higher' roles (admin/support) can access the Investors Guide book pages at /help/investors_guide/*

My rules are:

  • admin and support - no rules (ie no restrictions)
  • anonymous user and authenticated user: RESTRICT access to: help/investors_guide/*, help/representatives_guide/*, help/admins_guide/*
  • investor: RESTRICT access to: help/representatives_guide/*, help/admins_guide/*
  • representative: RESTRICT access to: help/investors_guide/*, help/admins_guide/*

Now, my account is not user 1, and I am both an 'authenticated user' (by Drupal) and in the 'support' role, which is custom set. The rules for authenticated user (ie hide those 3 book sections) seem to apply, regardless of the fact I am also in the support group, which should have no restrictions on these pages. I guess the rules are strict based on role, with no method of overriding for users with 'higher' roles...

Not sure of the solution here - there's no real 'hierarchy' of roles in Drupal, only that which we create with increasing amounts of permissions. Perhaps we need to introduce a 'priority' type field for the rules?

Comments

pwolanin’s picture

If I understand your post, I had a similar problem and solved it by going to the settings for the role which should have full access and setting the access rule as:

Access only the listed pages.

<u>Pages:</u>
*

So, to summarize- I've just set my access as "only access *", i.e. affirmatively allow access to all pages. don't know if this is a bug, or just needs to be documented better.

jamin’s picture

I have this same problem, and I tried using "*" to grant access to all pages, but the restrictions in authenticated user still trump it.

pwolanin’s picture

Check with the maintainer of the project- this behavior may have been fixed or changed in a more recent version.

budda’s picture

Assigned: Unassigned » budda

I've not done anything to address this problem yet. I will look in to it though - using the roleweight module to aid me.

budda’s picture

I've been using the role_weights.module - has this resolved your issue?

JacobSingh’s picture

See my patch. It should fix this problem

http://drupal.org/node/142805

budda’s picture

I've fixed the module in 5.x-dev CVS, give it a whirl.

budda’s picture

Version: master » 5.x-1.x-dev
Status: Active » Fixed

Assuming it's working for everybody else too as there's no replies. Marking as fixed.

Anonymous’s picture

Status: Fixed » Closed (fixed)