Merge pull request #5364 from rohitwaghchaure/setup_wizard_access_issue
[Fix] Restrict access to setup wizard page if setup is already completed
This commit is contained in:
commit
2edf6b84d6
@ -20,6 +20,7 @@ def setup_complete(args=None):
|
||||
|
||||
install_fixtures.install(args.get("country"))
|
||||
|
||||
update_setup_wizard_access()
|
||||
create_fiscal_year_and_company(args)
|
||||
create_users(args)
|
||||
set_defaults(args)
|
||||
@ -53,6 +54,14 @@ def setup_complete(args=None):
|
||||
|
||||
pass
|
||||
|
||||
def update_setup_wizard_access():
|
||||
setup_wizard = frappe.get_doc('Page', 'setup-wizard')
|
||||
for roles in setup_wizard.roles:
|
||||
if roles.role == 'System Manager':
|
||||
roles.role = 'Administrator'
|
||||
setup_wizard.flags.ignore_permissions = 1
|
||||
setup_wizard.save()
|
||||
|
||||
def create_fiscal_year_and_company(args):
|
||||
if (args.get('fy_start_date')):
|
||||
curr_fiscal_year = get_fy_details(args.get('fy_start_date'), args.get('fy_end_date'))
|
||||
|
Loading…
Reference in New Issue
Block a user