UserAuthorities

current-user. UserAuthorities

Simple wrapper class for the user authorities list

Constructor

new UserAuthorities(authorities)

Source:

Creates the UserAuthorities object based off the given set of the user's authorities.

Parameters:
Name Type Description
authorities Array.<string>

A set of the user's authorities.

Methods

(static) create(authorities)

Source:

Factory method for a UserAuthorities instance

Parameters:
Name Type Description
authorities Array.<string>

A set of the user's authorities as recieved from the api.

has(authority)

Source:

Checks if the given authority is in the user's authority list.

If the user has the 'ALL' authority any request for a authority will return true.

Parameters:
Name Type Description
authority string

The authority to check for