Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
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.
Comment | File | Size | Author |
---|---|---|---|
#4 | add-roles.patch | 15.58 KB | elliotttt |
#2 | user_settings.patch | 14.67 KB | elliotttt |
Comments
Comment #1
elliotttt CreditAttribution: elliotttt commentedI'm doing some cleanup on this module- will address this.
Comment #2
elliotttt CreditAttribution: elliotttt commentedDoing 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.
Comment #3
deviantintegral CreditAttribution: deviantintegral commentedThanks 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.
Comment #4
elliotttt CreditAttribution: elliotttt commentedupdated, 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.
Comment #5
elliotttt CreditAttribution: elliotttt commentedoops, realized I should have changed the status to needs review
Comment #6
elliotttt CreditAttribution: elliotttt commentedfound a problem where the roles fix only works some of the time, looking into it
Comment #7
StephenRobinson CreditAttribution: StephenRobinson commentedHi,
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;