View Source Mobilizon.Federation.ActivityPub.Permission (Mobilizon v5.0.0-beta.1)

Module to check group members permissions on objects

Summary

Functions

Check that actor can access the object

Check that actor can create such an object

Check that actor can delete the object

Check that actor can update the object

Types

Link to this type

existing_object_permissions()

View Source
@type existing_object_permissions() :: :access | :update | :delete
@type object() :: %{id: String.t(), url: String.t()}
Link to this type

permissions_member_role()

View Source
@type permissions_member_role() :: nil | :member | :moderator | :administrator
@type t() :: %Mobilizon.Federation.ActivityPub.Permission{
  access: permissions_member_role(),
  create: permissions_member_role(),
  delete: permissions_member_role(),
  update: permissions_member_role()
}

Functions

Link to this function

can_access_group_object?(actor, object)

View Source

Check that actor can access the object

Link to this function

can_create_group_object?(actor_id, group_id, object)

View Source
@spec can_create_group_object?(
  String.t() | integer(),
  String.t() | integer(),
  struct()
) :: boolean()

Check that actor can create such an object

Link to this function

can_delete_group_object?(actor, object)

View Source

Check that actor can delete the object

Link to this function

can_update_group_object?(actor, object)

View Source

Check that actor can update the object