Allow local user to have group actor type

https://git.pleroma.social/pleroma/pleroma/-/issues/3205
This commit is contained in:
tusooa 2023-11-05 18:49:31 -05:00
commit 7a58ddfa48
No known key found for this signature in database
GPG key ID: 42AEC43D48433C51
4 changed files with 35 additions and 2 deletions

View file

@ -39,6 +39,7 @@ defmodule Pleroma.User do
alias Pleroma.Workers.BackgroundWorker
require Logger
require Pleroma.Constants
@type t :: %__MODULE__{}
@type account_status ::
@ -579,7 +580,7 @@ defmodule Pleroma.User do
|> validate_format(:nickname, local_nickname_regex())
|> validate_length(:bio, max: bio_limit)
|> validate_length(:name, min: 1, max: name_limit)
|> validate_inclusion(:actor_type, ["Person", "Service"])
|> validate_inclusion(:actor_type, Pleroma.Constants.allowed_user_actor_types())
|> put_fields()
|> put_emoji()
|> put_change_if_present(:bio, &{:ok, parse_bio(&1, struct)})