RestAuth v2.0.0 RestAuth.Utility View Source
Module is responsible for taking a set of user roles and checking them against required roles on action.
Link to this section Summary
Functions
Gets current authority struct saved on conn
Retrieves current user_id from conn
.
Returns :anonymous
if the user is not authenticated
Gets current metadata saved on conn
Retrieves roles for current user from conn
Returns true
if all of the required_roles
are in users role, false
if not
Checks if the current user on conn
is logged in or not
Returns true
if one or more of the required_roles
are in users role, false
if not
Returns true
if none of the required_roles
are in users role, false
if not
Link to this section Functions
Gets current authority struct saved on conn
Retrieves current user_id from conn
.
Returns :anonymous
if the user is not authenticated
Gets current metadata saved on conn
Retrieves roles for current user from conn
.
Returns true
if all of the required_roles
are in users role, false
if not
Checks if the current user on conn
is logged in or not
Returns true
if one or more of the required_roles
are in users role, false
if not
Returns true
if none of the required_roles
are in users role, false
if not