Role and User Permissions

This commit is contained in:
Anand Doshi
2014-05-28 18:49:13 +05:30
parent 69eec9e344
commit 4985691617
10 changed files with 116 additions and 385 deletions

View File

@@ -392,7 +392,7 @@ def create_logo(args):
def add_all_roles_to(name):
user = frappe.get_doc("User", name)
for role in frappe.db.sql("""select name from tabRole"""):
if role[0] not in ["Administrator", "Guest", "All", "Customer", "Supplier", "Partner"]:
if role[0] not in ["Administrator", "Guest", "All", "Customer", "Supplier", "Partner", "Employee"]:
d = user.append("user_roles")
d.role = role[0]
user.save()