forked from potsda.mn/mobilizon
Change can_be_managed_by/2
to can_be_managed_by?/2
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
505b16611b
commit
6066a44ae8
|
@ -188,13 +188,11 @@ defmodule Mobilizon.Events.Event do
|
||||||
@doc """
|
@doc """
|
||||||
Checks whether an event can be managed.
|
Checks whether an event can be managed.
|
||||||
"""
|
"""
|
||||||
@spec can_be_managed_by(t, integer | String.t()) :: boolean
|
@spec can_be_managed_by?(t, integer | String.t()) :: boolean
|
||||||
def can_be_managed_by(%__MODULE__{organizer_actor_id: organizer_actor_id}, actor_id)
|
def can_be_managed_by?(%__MODULE__{organizer_actor_id: organizer_actor_id}, actor_id),
|
||||||
when organizer_actor_id == actor_id do
|
do: organizer_actor_id == actor_id
|
||||||
{:event_can_be_managed, true}
|
|
||||||
end
|
|
||||||
|
|
||||||
def can_be_managed_by(_event, _actor), do: {:event_can_be_managed, false}
|
def can_be_managed_by?(_event, _actor), do: false
|
||||||
|
|
||||||
@spec put_tags(Changeset.t(), map) :: Changeset.t()
|
@spec put_tags(Changeset.t(), map) :: Changeset.t()
|
||||||
defp put_tags(%Changeset{} = changeset, %{tags: tags}) do
|
defp put_tags(%Changeset{} = changeset, %{tags: tags}) do
|
||||||
|
|
Loading…
Reference in a new issue