mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-01 07:37:04 +00:00
Role and User Permissions
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user