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

This commit is contained in:
Anand Doshi 2015-04-27 15:24:07 -04:00
parent 3533309542
commit dcebf0896d

View file

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