Per-user app landing (supersedes #14) - #17
Open
hamad-clustox wants to merge 1 commit into
Open
hamad-clustox wants to merge 1 commit into
hamad-clustox wants to merge 1 commit into
Conversation
PR #14 pointed hrms `app_home` at /hrms so employees would land on the self-service PWA. But `app_home` is also the route of the "Frappe HR" app tile (get_route('hrms')), so it sent EVERYONE — including Administrator and HR — to /hrms and they could no longer reach the HR Setup desk workspace. Correct approach, leaving app_home at its upstream "/desk/hr-setup": - hooks.py: add `role_home_page = {"Employee Self Service": "hrms"}` so self-service employees still resolve to /hrms on a bare /login. - setup/permissions/set_app_landing.py: clear the global System Settings default_app and set landing per user — staff/desk roles -> erpnext (desk), self-service employees -> cleared (route via role_home_page + /hrms/login), pure helpdesk agents -> helpdesk. Applied on the test server: HR/Administrator's "Frappe HR" tile opens /desk/hr-setup again; employees land on /hrms. Employee entry stays https://<site>/hrms/login. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This was referenced Sep 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why (supersedes #14)
#14 set hrms
app_home = "/hrms"to route employees to the self-service PWA. Butapp_homeis the route of the "Frappe HR" app tile (get_route('hrms')), so it sent everyone — Administrator and HR included — to/hrms, and they could no longer open the HR Setup desk workspace. This PR fixes landing without touchingapp_home(it stays at the upstream/desk/hr-setup).Changes
hrms/hooks.py— add:so self-service employees still resolve to
/hrmson a bare/login, while the "Frappe HR" tile keeps opening the HR admin desk workspace for staff.setup/permissions/set_app_landing.py— clears the global System Settingsdefault_app(it was forcing everyone to one app) and sets landing per user:erpnext(desk,/desk/home)role_home_page+/hrms/login)helpdeskIdempotent; re-run after adding users (belongs in onboarding).
Verified on the test server
/desk/hr-setup(HR Setup) ✅get_default_path()→/desk/home✅/hrms(entryhttps://<site>/hrms/login) ✅Action
Close #14 — merging it as-is would reintroduce the regression.
🤖 Generated with Claude Code