fix: never apply role profiles to standard user (#24968)
This commit is contained in:
parent
8093a1d0a5
commit
b794f868cc
1 changed files with 4 additions and 0 deletions
|
|
@ -184,6 +184,10 @@ class User(Document):
|
|||
if not self.role_profiles:
|
||||
return
|
||||
|
||||
if self.name in STANDARD_USERS:
|
||||
self.role_profiles = []
|
||||
return
|
||||
|
||||
new_roles = set()
|
||||
for role_profile in self.role_profiles:
|
||||
role_profile = frappe.get_cached_doc("Role Profile", role_profile.role_profile)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue