Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The original Sandbox Port of Administer Users By Roles D7 had two API options to allow other modules to extend the default user edit/cancel access.
I would like to propose adding these hooks back into the module. Thoughts? Questions?
Comment | File | Size | Author |
---|---|---|---|
#4 | administerusersbyrole-add_drupal_alter-1953576-4.patch | 585 bytes | russellb |
administerusersbyrole-add_api_hooks.patch | 3.16 KB | MD3 | |
Comments
Comment #2
russellb CreditAttribution: russellb commentedSecond this, I need to do some custom access.
Comment #3
russellb CreditAttribution: russellb commentedI think drupal_alter would be better here:
drupal_alter('administerusersbyrole_can_edit', $allow, $account);
..
drupal_alter('administerusersbyrole_can_cancel', $allow, $account);
Then the module intervening gets to find out adminusersbyrole's decision, and it removes the extra logic.
Comment #4
russellb CreditAttribution: russellb commentedPatch adding Drupal alters to allow custom permissions.
Comment #5
russellb CreditAttribution: russellb commentedComment #6
russellb CreditAttribution: russellb commentedComment #7
AdamPS CreditAttribution: AdamPS commentedIf anyone wants to rework this for the 2.x branch then I would be willing to apply it.
Comment #8
AdamPS CreditAttribution: AdamPS commentedThe new 3.x branch allows something roughly equivalent.