Bläddra i källkod

[hotfix] User's roles should include both All and Guest roles

version-14
Anand Doshi 10 år sedan
förälder
incheckning
dcebf0896d
1 ändrade filer med 1 tillägg och 1 borttagningar
  1. +1
    -1
      frappe/utils/user.py

+ 1
- 1
frappe/utils/user.py Visa fil

@@ -262,7 +262,7 @@ def get_roles(user=None, with_standard=True):
roles = frappe.cache().get_value("roles", user=user)
if not roles:
roles = [r[0] for r in frappe.db.sql("""select role from tabUserRole
where parent=%s and role!='All'""", (user,))] + ['All']
where parent=%s and role not in ('All', 'Guest')""", (user,))] + ['All', 'Guest']
frappe.cache().set_value("roles", roles, user=user)

# filter standard if required


Laddar…
Avbryt
Spara