- Issue created by @chike
- πΈπ°Slovakia coaston
Hello chike,
I am unable to reproduce the issue.
1.Go to /admin/config/people/accounts/fields
2.Add new filed like Country (free text field or entity refrenrece to taxonomy)
3.edit field Country > Field visibility and permissions > Custom permissions > and do not select anything, keep just admin populated everything.
4.Now login as user
5.I cannot see or edit Country.Do you have any other case ?
- π³π¬Nigeria chike Nigeria
I added a telephone number, phone_number field to users and wants users of role 'Agent' to be able to create the field but not be able to edit it after saving it.
I set the permissions as this,
But when I log in as 'Agent' I am still able to edit the phone_number field.
- πΈπ°Slovakia coaston
I just tested for D9 and D10 and it works for me.
1. Created new role
2. Added all permissions to role for a new user create
3. Added country field to user profile and set permission to create and view own
4. Logged as user with a new role
5. Created new user - was able to add country
6. If i click edit user i cannot see country, hence cannot update it.However in drupal 9 i can see field country but it is greyed out so unable to update it. In drupal 10 i am unable to see that field which is odd. But yeah as i cannot see i cannot update.
- π³π¬Nigeria chike Nigeria
I have found the cause. I am using Multiple Registration module, https://www.drupal.org/project/multiple_registration β and incidentally I used it in every site I had this issue with field_permissions. Multiple Registration adds it's own visibility permissions for fields like,
Once I check any box there that includes the role, it disables 'field_permissions' for that field for that role.
So now when I removed the checkmarks, the phone_number field became hidden and I wasn't able to see it on the edit form meaning I couldn't edit it. Using Drupal 10.
I think the behaviour in Drupal 9 is preferable being that one should see the field grayed out.
Thank you.
- π©π°Denmark ressa Copenhagen
I can confirm this bug. If you use Multiple Registration module, Field Permissions rules are ignored.
- Status changed to Closed: duplicate
over 1 year ago 5:23pm 6 January 2024 - π©π°Denmark ressa Copenhagen
@chike: The problem is with Multiple Registration. I found another issue π Editing profile does not respect field permissions Needs review , with a patch which solves the problem for me. Maybe you can try it, and see if it works for you as well?
I also don't see the field greyed out, the field is not shown at all. But maybe it's actually best that way? See #3094098-27: Provide form display formatter for greying-out a field or hiding it completely β .