rbac v0.3.0 RBAC

Documentation for Rbac.

Link to this section Summary

Functions

Transform a list of maps (roles) to comma-separated string of ids.

Link to this section Functions

Link to this function

transform_role_list_to_string(roles)

Transform a list of maps (roles) to comma-separated string of ids.

Examples

iex> RBAC.transform_role_list_to_string([%{id: 1}, %{id: 2}, %{id: 3}])
"1,2,3"

iex> RBAC.transform_role_list_to_string("1,2,3")
"1,2,3"

iex> RBAC.transform_role_list_to_string(%{name: "sub", id: 1, revoked: nil})
"1"

iex> RBAC.transform_role_list_to_string([%{id: 1, revoked: 1}, %{id: 3}])
"3"