View Source ZoonkWeb.Privacy (Zoonk v0.3.0-alpha)
Privacy configuration.
Link to this section Summary
Functions
Returns the localized label from a list of privacy actions.
Returns the localized label from a list of privacy group keys.
Returns the list of unauthorized privacy groups and their labels.
Link to this section Functions
Returns the localized label from a list of privacy actions.
examples
Examples
iex> privacy_action_labels!([:login_account, :contact_by_manager])
["Allow to log in into your account", "Allow school managers to contact you"]
iex> privacy_action_labels!([:invalid])
** (KeyError) key :invalid not found in:
Returns the localized label from a list of privacy group keys.
examples
Examples
iex> privacy_group_labels!([:school_managers, :teachers])
["School managers", "Teachers"]
iex> privacy_group_labels!([:invalid])
** (KeyError) key :invalid not found in:
Returns the list of unauthorized privacy groups and their labels.
This list is based on the list of authorized groups. It returns all groups that aren't listed as authorized.
examples
Examples
iex> unauthorized_group_labels!([:school_managers, :teachers])
["Students from your school", "Students from other schools", ...]
iex> unauthorized_group_labels!([:invalid])
** (KeyError) key :invalid not found in: