Lti_1p3.Tool.PlatformRoles (Lti 1p3 v0.6.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)

Returns true if a list of roles contains a given role

Link to this function

get_highest_role(roles)

@spec get_highest_role([Lti_1p3.Tool.PlatformRole.t()]) ::
  Lti_1p3.Tool.PlatformRole.t()

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)

@spec get_roles_by_uris([String.t()]) :: [
  %Lti_1p3.Tool.PlatformRole{id: term(), uri: term()}
]

Returns all valid roles from a list of uris

Link to this function

has_role?(user, role)

Returns true if a user has a given role

Link to this function

has_roles?(user, roles, atom)

Returns true if a user has any of the given roles