Skip to main content

Permission and Feature Validation

useRouteValidator Hook

Most account feature and system permission checking happens in this hook.

This hook is used to validate if a specific route should even be rendered, if tabs on a page should be show, if navbar or sidenav options should be show or hidden, and which features show up in the account features flyout (to name some of the most common).

There a couple of functions in the hook to validate routes.

  • canGoToRoute: checks to see if the logged in user can go to a specific route.
  • canGoToSomeRoute: checks to see if the logged in user can go to at least one route in a set of routes.

useAccountFeatureValidator Hook

There are several functions to validate features on the logged in users accounts.

  • accountFeaturesHaveLoaded: checks if account features have been loaded from the back end and cached for quick lookup.
  • hasFeatureOnAccount: checks to see if a specific account has a specific feature (or set of features)
  • hasFeatureOnSomeAccount: checks to see if any account has a specific feature (or set of features)
  • isESignatureFeatureAvailable: checks if a specific account has the eSignature account feature or if the user is authenticated to docusign (either indicates that the eSignature feature can be used.

useSystemPermissionsValidator Hook

There are several functions to validate system permissions the logged in users accounts.

  • hasPermissionOnAccount: checks to see if the logged in user has specific system permission(s) an a specific account.
  • hasSomePermissionOnAccount: checks to see if the logged in user has any one of a set of system permissions on a specific account.
  • hasPermissionOnSomeAccount: checks to see if the logged in user has system permission(s) on any of their accounts.
  • systemPermissionsHaveLoaded: checks if the logged in users system permissions have been loaded from the back end and cached for quick lookup.