Add new setting and Plug to allow for privilege settings for staff

This commit is contained in:
Ilja 2022-05-21 18:48:21 +02:00
commit 5b19543f0a
4 changed files with 154 additions and 0 deletions

View file

@ -257,6 +257,8 @@ config :pleroma, :instance,
password_reset_token_validity: 60 * 60 * 24,
profile_directory: true,
privileged_staff: false,
admin_privileges: [],
moderator_privileges: [],
max_endorsed_users: 20,
birthday_required: false,
birthday_min_age: 0,

View file

@ -966,6 +966,18 @@ config :pleroma, :config_description, [
description:
"Let moderators access sensitive data (e.g. updating user credentials, get password reset token, delete users, index and read private statuses and chats)"
},
%{
key: :admin_privileges,
type: {:list, :atom},
suggestions: [],
description: "What extra priviledges to allow admins (e.g. updating user credentials, get password reset token, delete users, index and read private statuses and chats)"
},
%{
key: :moderator_privileges,
type: {:list, :atom},
suggestions: [],
description: "What extra priviledges to allow moderators (e.g. updating user credentials, get password reset token, delete users, index and read private statuses and chats)"
},
%{
key: :birthday_required,
type: :boolean,