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.
There's a permission under avatar_selection_module called "upload avatar in profile". It doesn't seem to have any effect.
The ability to upload a user "picture" is controlled in core on the User Settings page, regardless of whether the avatar_selection module is enabled. It would make a sense to be able to restrict user picture upload by role, but that feature doesn't exist in core.
Is this a proposed feature that never got implemented but the permissions still appears?
Comment | File | Size | Author |
---|---|---|---|
#4 | upload-avatar-perm-D6.patch | 1.25 KB | MarcElbichon |
#1 | upload-avatar-perm-1062348-D6.patch | 1.25 KB | SeanA |
#1 | upload-avatar-perm-1062348-D7.patch | 2.53 KB | SeanA |
Comments
Comment #1
SeanA CreditAttribution: SeanA commentedThere's a small error in the code which makes it so this permission has no effect. Fixes for 6.x and 7.x attached.
Comment #2
SeanA CreditAttribution: SeanA commentedComment #3
MarcElbichon CreditAttribution: MarcElbichon commentedIn patch, && must be replaced by || because upload field must be unset if one of permission is true (and not both).
Correct ?
I think "Disable users uploading pictures to profile" option should be removed because this can be done with "upload avatar in profile" role.
Comment #4
MarcElbichon CreditAttribution: MarcElbichon commentedPatch for #3
Comment #5
SeanA CreditAttribution: SeanA commentedHmm. I believe the "and" operator is what's wanted here, because the idea is to give certain users permission to bypass avatar_selection_disable_user_upload when avatar_selection_disable_user_upload is set to TRUE.
Comment #6
SeanA CreditAttribution: SeanA commentedSee #330213: allow admin or certain users the ability to upload their own avatar for the intent behind this permission.
Comment #7
stella CreditAttribution: stella commentedFixed in both D6 and D7 branches. Patches from comment #3 used.