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?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

SeanA’s picture

Version: 6.x-1.6 » 6.x-1.x-dev
FileSize
2.53 KB
1.25 KB

There's a small error in the code which makes it so this permission has no effect. Fixes for 6.x and 7.x attached.

SeanA’s picture

Status: Active » Needs review
MarcElbichon’s picture

In 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.

MarcElbichon’s picture

FileSize
1.25 KB

Patch for #3

SeanA’s picture

Hmm. 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.

SeanA’s picture

stella’s picture

Status: Needs review » Fixed

Fixed in both D6 and D7 branches. Patches from comment #3 used.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.