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
@type existing_object_permissions() :: :access | :update | :delete
@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
@spec can_access_group_object?( Mobilizon.Actors.Actor.t(), Mobilizon.Federation.ActivityPub.Types.Entity.t() ) :: boolean()
Check that actor can access the object
@spec can_create_group_object?( String.t() | integer(), String.t() | integer(), struct() ) :: boolean()
Check that actor can create such an object
@spec can_delete_group_object?( Mobilizon.Actors.Actor.t(), Mobilizon.Federation.ActivityPub.Types.Entity.t() ) :: boolean()
Check that actor can delete the object
@spec can_update_group_object?( Mobilizon.Actors.Actor.t(), Mobilizon.Federation.ActivityPub.Types.Entity.t() ) :: boolean()
Check that actor can update the object