Currently there are no access callbacks for the user properties, which results in scenarios where the user's email address is accessible with the "View user profiles" permission (see also #1042582: Resource permissions). This is an example for a property that should only be visible with the "Administer users" permission.
I'll look into it.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

klausi’s picture

Status: Active » Needs review
FileSize
1.69 KB

Patch to restrict "mail" and "roles" property.

BenK’s picture

Subscribing

fago’s picture

FileSize
2.27 KB

This would mean everyone can change its own roles - not so good ;)
Here is an updated patch, also including the user name property. Please review.

klausi’s picture

I find that code very hard to read. Here is a modified version that does the same but is hopefully easier to read.

fago’s picture

Status: Needs review » Fixed

Thanks, indeed that's better. I've fixed two typos and committed it.

Status: Fixed » Closed (fixed)

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