I am trying to customize my frappe app based on a role.
Role Website
logs in.If the user tries to navigate away to any other URL then redirect them to Step 2
.
I believe it can be done with a middleware. But, my question is, where would we invoke the middleware in my custom app?
I tried to to add a custom middleware and tried to invoke in the frappe
app but I dont think this is the suggested way.
You should be able to add an auth or login hook to do this for you. Check the user data, set the route location in the flags and raise frappe.Redirect
Refs: