From dcebf0896d1de5733f259b04fb1de592aae4f5cd Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Mon, 27 Apr 2015 15:24:07 -0400 Subject: [PATCH] [hotfix] User's roles should include both All and Guest roles --- frappe/utils/user.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/utils/user.py b/frappe/utils/user.py index 0196be9f2d..77963454f5 100644 --- a/frappe/utils/user.py +++ b/frappe/utils/user.py @@ -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