Skip to content

Commit

Permalink
Merge pull request #37534 from frappe/mergify/bp/version-13-hotfix/pr…
Browse files Browse the repository at this point in the history
…-37532

fix: keep customer/supplier website role by default (backport #37532)
  • Loading branch information
ankush authored Oct 16, 2023
2 parents 1cfc6cf + 52aff1f commit fe681ac
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions erpnext/setup/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ def after_install():
add_standard_navbar_items()
add_app_name()
add_non_standard_user_types()
update_roles()
frappe.db.commit()


Expand Down Expand Up @@ -237,6 +238,12 @@ def create_custom_role(data):
).insert(ignore_permissions=True)


def update_roles():
website_user_roles = ("Customer", "Supplier")
for role in website_user_roles:
frappe.db.set_value("Role", role, "desk_access", 0)


def create_user_type(user_type, data):
if frappe.db.exists("User Type", user_type):
doc = frappe.get_cached_doc("User Type", user_type)
Expand Down

0 comments on commit fe681ac

Please sign in to comment.