router/guards
Overview
Vue Router navigation guards for enforcing authentication, group membership, and model info availability.
Methods
- requireAuth - Require the user to be authenticated.
- requireCurrentUser - Require a successful answer to the current-user request, so the route can show or use the user object without requiring authentication.
- requireGroups - Require the user to have certain groups, or show a toast message for denial.
- requireModelInfo - Require model info to be loaded before accessing the route.
- requireRecentAuth - Require the user to be recently authenticated: signed in with no
storeUser.authPendingFlow. - requireUnauth - Require the user to be unauthenticated, like for a login page.
- waitForCurrentUser - Wait until the store holds a successful answer to the current-user request.
- waitForModelStoreLoad - Wait for store model config to load
Source
client/lib/router/guards.js:1