Skip to content

Commit

Permalink
Merge pull request #37533 from frappe/mergify/bp/version-14-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 001c230 + 76ef61c commit d598dad
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_app_name()
setup_log_settings()
hide_workspaces()
update_roles()
frappe.db.commit()


Expand Down Expand Up @@ -214,6 +215,12 @@ def hide_workspaces():
frappe.db.set_value("Workspace", ws, "public", 0)


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_default_role_profiles():
for role_profile_name, roles in DEFAULT_ROLE_PROFILES.items():
role_profile = frappe.new_doc("Role Profile")
Expand Down

0 comments on commit d598dad

Please sign in to comment.