fix: never apply role profiles to standard user (#24968)

This commit is contained in:
Ankush Menat 2024-02-20 19:37:50 +05:30 committed by GitHub
parent 8093a1d0a5
commit b794f868cc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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)