I was getting the "Your account doesn't have permission..." error message for users who had permission for exactly one term in a required vocabulary.

I think $total_terms should be count($vocabulary['#options']) without the "+ 1". Changing line 116 in the module appears to solve the problem.

CommentFileSizeAuthor
#4 add-roles.patch15.58 KBelliotttt
#2 user_settings.patch14.67 KBelliotttt
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

elliotttt’s picture

Assigned: Unassigned » elliotttt

I'm doing some cleanup on this module- will address this.

elliotttt’s picture

Status: Active » Needs work
FileSize
14.67 KB

Doing a significant proposed overhaul of this module, so this patch actually removes some functionality, but addresses the aforementioned bug.

Things this patch removes:
Everything related to roles and term permissions. You've been warned! :)

Things this patch fixes/alters:
-The term count (as mentioned above)
-Moves the permissions control out of the taxonomy term page, and into the user/edit pages
-Checks to make sure the user making edits has the 'administer users' permission
-Changed the way the node/add form checks against the permissions

I figured I'd post this milestone, I plan on adding back in the roles functionality.

deviantintegral’s picture

Thanks for the patch. It's much more difficult to test and review all of the changes when they are combined in a single patch, so it would be appreciated if it could be split up where possible.

elliotttt’s picture

FileSize
15.58 KB

updated, this patch adds back in the ability to manage user's access to term permissions by role in addition to by user.

The role permissions have been moved into the normal system permissions page, since that's generally where role based permissions get administered.

I believe this change also makes it so we no longer need the second db cross ref table for managing role based permissions.

elliotttt’s picture

Assigned: elliotttt » Unassigned
Status: Needs work » Needs review

oops, realized I should have changed the status to needs review

elliotttt’s picture

Status: Needs review » Needs work

found a problem where the roles fix only works some of the time, looking into it

StephenRobinson’s picture

Hi,
Multiple selects don't have a please select option, using this line addresses the multiple select issue:

//$total_terms = count($vocabulary['#options']) - 1;

($vocabulary['#multiple']==1) ? $total_terms = count($vocabulary['#options']) : $total_terms = count($vocabulary['#options']) - 1;