Hello everyone,
I need to change user permission or role after they are approved by admin, I prefer to run a server script on update user to check the user and change user permissions.
How can I do that?
Thanks in advance.
Hello everyone,
I need to change user permission or role after they are approved by admin, I prefer to run a server script on update user to check the user and change user permissions.
How can I do that?
Thanks in advance.
For the first part, checking user permission in server script:
users = frappe.db.get_list('User')
for i in users:
has_role = frappe.get_all('Has Role', filters=dict(parent=i.name))
#print(i.name, has_role)
I don’t have anything for changing user permissions atm.