Class: SecureStateCheck

SecureStateCheck

new SecureStateCheck(states)

Provides functionality useful for state authorisation.
Parameters:
Name Type Description
states Array Array of state names you need to be logged in to access. Given a state name "project" matches using regexp /^project/ e.g. "project" as well as "project-new".
Source:

Methods

(private) _buildRegExp(states) → {Array}

Builds regexp array used for state matching.
Parameters:
Name Type Description
states Array array of state names
Source:
Returns:
Type
Array

hasAccess(state, user) → {boolean}

Returns true if user is allowed to visit a given state.
Parameters:
Name Type Description
state from $stateProvider service
user
Source:
Returns:
Type
boolean