Lti_1p3.Tool.ContextRoles (Lti 1p3 v0.3.0)

Link to this section Summary

Functions

Returns true if a list of roles contains a given role

Returns the highest level role from a list of roles. This function assumes roles have an ordinality which is defined by list_roles()

Returns a role from a given atom if it is valid, otherwise returns nil

Returns a role from a given uri if it is valid, otherwise returns nil

Returns all valid roles from a list of uris

Returns true if a user has a given role

Returns true if a user has any of the given roles

Link to this section Functions

Link to this function

contains_role?(roles, role)

Specs

Returns true if a list of roles contains a given role

Link to this function

get_highest_role(roles)

Specs

Returns the highest level role from a list of roles. This function assumes roles have an ordinality which is defined by list_roles()

Returns a role from a given atom if it is valid, otherwise returns nil

Link to this function

get_role_by_uri(arg1)

Returns a role from a given uri if it is valid, otherwise returns nil

Link to this function

get_roles_by_uris(uris)

Specs

get_roles_by_uris([String.t()]) :: [Lti_1p3.Tool.ContextRole.t()]

Returns all valid roles from a list of uris

Link to this function

has_role?(user, context, role)

Specs

Returns true if a user has a given role

Link to this function

has_roles?(user, context, roles, atom)

Specs

Returns true if a user has any of the given roles