Ignore permissions to edit user data?

I want some users to assign roles to other users but should not be able to access other user data. I’ve created a single doctype where the specific user can only edit the role part of other users but it seems that ignore_permissions doesn’t work? How can I solve this?

By the way this is my code for the doctype where the user can edit the roles of other users

1 Like

@Rabie_Moses_Santilla the screenshot you shared is about duplicate name . can you explain more about your “ignore permissions” issue . and why are you using python to set permissions for a doctype ? there is a UI to do such a thing.

The duplicate name error occured when I changed the doc.save() to doc.insert() but before it says this

I want to do it programmatically because the assigned user that would change the role of other users is not permitted to set other roles to other users. The only role he can add to other users is Pawnshop Cashier which is a custom role that I made. That’s why he can’t use the UI for security purposes.

1 Like

@Rabie_Moses_Santilla try to give him permissions to write users .

I am having similar issue on version 13 the ignore_permissions=True flag doesn’t seem to work. Does anyone have a fix for this?