From 5b19543f0afaaad7f8fc302946547ae5c18e8bb3 Mon Sep 17 00:00:00 2001 From: Ilja Date: Sat, 21 May 2022 18:48:21 +0200 Subject: Add new setting and Plug to allow for privilege settings for staff --- config/config.exs | 2 ++ config/description.exs | 12 ++++++++++++ 2 files changed, 14 insertions(+) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index 6a5acda09..2d501e577 100644 --- a/config/config.exs +++ b/config/config.exs @@ -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, diff --git a/config/description.exs b/config/description.exs index 704af8f68..b73b92c46 100644 --- a/config/description.exs +++ b/config/description.exs @@ -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, -- cgit v1.2.3 From 9f6c36475914bfd1b8c02035341765b4d1bd4395 Mon Sep 17 00:00:00 2001 From: Ilja Date: Thu, 26 May 2022 12:49:09 +0200 Subject: Add privilege :user_deletion --- config/config.exs | 2 +- config/description.exs | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index 2d501e577..496a1d57a 100644 --- a/config/config.exs +++ b/config/config.exs @@ -257,7 +257,7 @@ config :pleroma, :instance, password_reset_token_validity: 60 * 60 * 24, profile_directory: true, privileged_staff: false, - admin_privileges: [], + admin_privileges: [:user_deletion], moderator_privileges: [], max_endorsed_users: 20, birthday_required: false, diff --git a/config/description.exs b/config/description.exs index b73b92c46..b45d416b1 100644 --- a/config/description.exs +++ b/config/description.exs @@ -969,14 +969,16 @@ config :pleroma, :config_description, [ %{ 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)" + suggestions: [:user_deletion], + 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)" + suggestions: [:user_deletion], + 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, -- cgit v1.2.3 From 8a9144ca8b8e17df509dc8ac3934656b7dac8d77 Mon Sep 17 00:00:00 2001 From: Ilja Date: Thu, 26 May 2022 13:27:06 +0200 Subject: Add priviledges for :user_credentials I only moved the ones from the :require_privileged_staff block for now --- config/config.exs | 2 +- config/description.exs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index 496a1d57a..2a5770bf4 100644 --- a/config/config.exs +++ b/config/config.exs @@ -257,7 +257,7 @@ config :pleroma, :instance, password_reset_token_validity: 60 * 60 * 24, profile_directory: true, privileged_staff: false, - admin_privileges: [:user_deletion], + admin_privileges: [:user_deletion, :user_credentials], moderator_privileges: [], max_endorsed_users: 20, birthday_required: false, diff --git a/config/description.exs b/config/description.exs index b45d416b1..4986ccce6 100644 --- a/config/description.exs +++ b/config/description.exs @@ -969,14 +969,14 @@ config :pleroma, :config_description, [ %{ key: :admin_privileges, type: {:list, :atom}, - suggestions: [:user_deletion], + suggestions: [:user_deletion, :user_credentials], 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: [:user_deletion], + suggestions: [:user_deletion, :user_credentials], 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)" }, -- cgit v1.2.3 From 5a65e2dac5e689b8067e37817bbfe4a6fe1a0426 Mon Sep 17 00:00:00 2001 From: Ilja Date: Thu, 26 May 2022 14:51:53 +0200 Subject: Remove privileged_staff Everything that was done through this setting, can now be set by giving the proper privileges to the roles. --- config/config.exs | 3 +-- config/description.exs | 10 ++-------- 2 files changed, 3 insertions(+), 10 deletions(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index 2a5770bf4..4cdc90c7a 100644 --- a/config/config.exs +++ b/config/config.exs @@ -256,8 +256,7 @@ config :pleroma, :instance, show_reactions: true, password_reset_token_validity: 60 * 60 * 24, profile_directory: true, - privileged_staff: false, - admin_privileges: [:user_deletion, :user_credentials], + admin_privileges: [:user_deletion, :user_credentials, :statuses_read], moderator_privileges: [], max_endorsed_users: 20, birthday_required: false, diff --git a/config/description.exs b/config/description.exs index 4986ccce6..b0b8ecd88 100644 --- a/config/description.exs +++ b/config/description.exs @@ -960,23 +960,17 @@ config :pleroma, :config_description, [ type: :boolean, description: "Enable profile directory." }, - %{ - key: :privileged_staff, - type: :boolean, - 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: [:user_deletion, :user_credentials], + suggestions: [:user_deletion, :user_credentials, :statuses_read], 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: [:user_deletion, :user_credentials], + suggestions: [:user_deletion, :user_credentials, :statuses_read], 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)" }, -- cgit v1.2.3 From cb60cc4e02af270fcccdcd552df4fa3ff858d67f Mon Sep 17 00:00:00 2001 From: Ilja Date: Thu, 26 May 2022 16:25:28 +0200 Subject: Add privileges for :user_tag --- config/config.exs | 2 +- config/description.exs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index 4cdc90c7a..f2001eef0 100644 --- a/config/config.exs +++ b/config/config.exs @@ -256,7 +256,7 @@ config :pleroma, :instance, show_reactions: true, password_reset_token_validity: 60 * 60 * 24, profile_directory: true, - admin_privileges: [:user_deletion, :user_credentials, :statuses_read], + admin_privileges: [:user_deletion, :user_credentials, :statuses_read, :user_tag], moderator_privileges: [], max_endorsed_users: 20, birthday_required: false, diff --git a/config/description.exs b/config/description.exs index b0b8ecd88..f455a2e46 100644 --- a/config/description.exs +++ b/config/description.exs @@ -963,14 +963,14 @@ config :pleroma, :config_description, [ %{ key: :admin_privileges, type: {:list, :atom}, - suggestions: [:user_deletion, :user_credentials, :statuses_read], + suggestions: [:user_deletion, :user_credentials, :statuses_read, :user_tag], 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: [:user_deletion, :user_credentials, :statuses_read], + suggestions: [:user_deletion, :user_credentials, :statuses_read, :user_tag], 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)" }, -- cgit v1.2.3 From e102d25d2385761077c08e0b280359392f0592cb Mon Sep 17 00:00:00 2001 From: Ilja Date: Thu, 26 May 2022 16:41:48 +0200 Subject: Add privileges for :user_activation --- config/config.exs | 8 +++++++- config/description.exs | 16 ++++++++++++++-- 2 files changed, 21 insertions(+), 3 deletions(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index f2001eef0..53c0cc329 100644 --- a/config/config.exs +++ b/config/config.exs @@ -256,7 +256,13 @@ config :pleroma, :instance, show_reactions: true, password_reset_token_validity: 60 * 60 * 24, profile_directory: true, - admin_privileges: [:user_deletion, :user_credentials, :statuses_read, :user_tag], + admin_privileges: [ + :user_deletion, + :user_credentials, + :statuses_read, + :user_tag, + :user_activation + ], moderator_privileges: [], max_endorsed_users: 20, birthday_required: false, diff --git a/config/description.exs b/config/description.exs index f455a2e46..51d3ad8aa 100644 --- a/config/description.exs +++ b/config/description.exs @@ -963,14 +963,26 @@ config :pleroma, :config_description, [ %{ key: :admin_privileges, type: {:list, :atom}, - suggestions: [:user_deletion, :user_credentials, :statuses_read, :user_tag], + suggestions: [ + :user_deletion, + :user_credentials, + :statuses_read, + :user_tag, + :user_activation + ], 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: [:user_deletion, :user_credentials, :statuses_read, :user_tag], + suggestions: [ + :user_deletion, + :user_credentials, + :statuses_read, + :user_tag, + :user_activation + ], 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)" }, -- cgit v1.2.3 From 14e697a64fe2613649634d46a71acf4d9a7d7bd6 Mon Sep 17 00:00:00 2001 From: Ilja Date: Sat, 28 May 2022 08:51:49 +0200 Subject: Add privileges for :user_invite --- config/config.exs | 3 ++- config/description.exs | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index 53c0cc329..a0c18c75a 100644 --- a/config/config.exs +++ b/config/config.exs @@ -261,7 +261,8 @@ config :pleroma, :instance, :user_credentials, :statuses_read, :user_tag, - :user_activation + :user_activation, + :user_invite ], moderator_privileges: [], max_endorsed_users: 20, diff --git a/config/description.exs b/config/description.exs index 51d3ad8aa..7e74778c5 100644 --- a/config/description.exs +++ b/config/description.exs @@ -968,7 +968,8 @@ config :pleroma, :config_description, [ :user_credentials, :statuses_read, :user_tag, - :user_activation + :user_activation, + :user_invite ], 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)" @@ -981,7 +982,8 @@ config :pleroma, :config_description, [ :user_credentials, :statuses_read, :user_tag, - :user_activation + :user_activation, + :user_invite ], 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)" -- cgit v1.2.3 From 3f26f1b30fe605635e3faf610f813f3ae3ad43ec Mon Sep 17 00:00:00 2001 From: Ilja Date: Sat, 28 May 2022 09:43:57 +0200 Subject: Add privileges for :report_handle --- config/config.exs | 3 ++- config/description.exs | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index a0c18c75a..6fd7044e3 100644 --- a/config/config.exs +++ b/config/config.exs @@ -262,7 +262,8 @@ config :pleroma, :instance, :statuses_read, :user_tag, :user_activation, - :user_invite + :user_invite, + :report_handle ], moderator_privileges: [], max_endorsed_users: 20, diff --git a/config/description.exs b/config/description.exs index 7e74778c5..d0364340e 100644 --- a/config/description.exs +++ b/config/description.exs @@ -969,7 +969,8 @@ config :pleroma, :config_description, [ :statuses_read, :user_tag, :user_activation, - :user_invite + :user_invite, + :report_handle ], 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)" @@ -983,7 +984,8 @@ config :pleroma, :config_description, [ :statuses_read, :user_tag, :user_activation, - :user_invite + :user_invite, + :report_handle ], 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)" -- cgit v1.2.3 From cbb26262a5957d3a72bef383a394bb3b2ad0215d Mon Sep 17 00:00:00 2001 From: Ilja Date: Sat, 28 May 2022 12:15:36 +0200 Subject: Add privileges for :user_read --- config/config.exs | 3 ++- config/description.exs | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index 6fd7044e3..778e6bf21 100644 --- a/config/config.exs +++ b/config/config.exs @@ -263,7 +263,8 @@ config :pleroma, :instance, :user_tag, :user_activation, :user_invite, - :report_handle + :report_handle, + :user_read ], moderator_privileges: [], max_endorsed_users: 20, diff --git a/config/description.exs b/config/description.exs index d0364340e..6d8cacace 100644 --- a/config/description.exs +++ b/config/description.exs @@ -970,7 +970,8 @@ config :pleroma, :config_description, [ :user_tag, :user_activation, :user_invite, - :report_handle + :report_handle, + :user_read ], 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)" @@ -985,7 +986,8 @@ config :pleroma, :config_description, [ :user_tag, :user_activation, :user_invite, - :report_handle + :report_handle, + :user_read ], 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)" -- cgit v1.2.3 From 0ee8f33250f649c7807fd161b9d6588757f5dc94 Mon Sep 17 00:00:00 2001 From: Ilja Date: Sat, 11 Jun 2022 13:08:40 +0200 Subject: Add privilige :status_delete It also allows to update a message, so it's not just deleting. I need a better name... --- config/config.exs | 3 ++- config/description.exs | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index 778e6bf21..ef2211426 100644 --- a/config/config.exs +++ b/config/config.exs @@ -264,7 +264,8 @@ config :pleroma, :instance, :user_activation, :user_invite, :report_handle, - :user_read + :user_read, + :status_delete ], moderator_privileges: [], max_endorsed_users: 20, diff --git a/config/description.exs b/config/description.exs index 6d8cacace..8ef649e99 100644 --- a/config/description.exs +++ b/config/description.exs @@ -971,7 +971,8 @@ config :pleroma, :config_description, [ :user_activation, :user_invite, :report_handle, - :user_read + :user_read, + :status_delete ], 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)" @@ -987,7 +988,8 @@ config :pleroma, :config_description, [ :user_activation, :user_invite, :report_handle, - :user_read + :user_read, + :status_delete ], 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)" -- cgit v1.2.3 From ecd42a2ce112489bb09cadcffc3661314a37a7fa Mon Sep 17 00:00:00 2001 From: Ilja Date: Sat, 11 Jun 2022 22:18:21 +0200 Subject: Add privilige :emoji_management --- config/config.exs | 3 ++- config/description.exs | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index ef2211426..263299e4d 100644 --- a/config/config.exs +++ b/config/config.exs @@ -265,7 +265,8 @@ config :pleroma, :instance, :user_invite, :report_handle, :user_read, - :status_delete + :status_delete, + :emoji_management ], moderator_privileges: [], max_endorsed_users: 20, diff --git a/config/description.exs b/config/description.exs index 8ef649e99..9f595fae0 100644 --- a/config/description.exs +++ b/config/description.exs @@ -972,7 +972,8 @@ config :pleroma, :config_description, [ :user_invite, :report_handle, :user_read, - :status_delete + :status_delete, + :emoji_management ], 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)" @@ -989,7 +990,8 @@ config :pleroma, :config_description, [ :user_invite, :report_handle, :user_read, - :status_delete + :status_delete, + :emoji_management ], 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)" -- cgit v1.2.3 From 37fdf148b0963b62ab746a8ece2aacf893ba8934 Mon Sep 17 00:00:00 2001 From: Ilja Date: Fri, 1 Jul 2022 09:54:05 +0200 Subject: Rename privilege tags I first focussed on getting things working Now that they do and we know what tags there are, I put some thought in providing better names I use the form _ :statuses_read => :messages_read :status_delete => :messages_delete :user_read => :users_read :user_deletion => :users_delete :user_activation => :users_manage_activation_state :user_invite => :users_manage_invites :user_tag => :users_manage_tags :user_credentials => :users_manage_credentials :report_handle => :reports_manage_reports :emoji_management => :emoji_manage_emoji --- config/config.exs | 20 ++++++++++---------- config/description.exs | 40 ++++++++++++++++++++-------------------- 2 files changed, 30 insertions(+), 30 deletions(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index 263299e4d..935d4fc98 100644 --- a/config/config.exs +++ b/config/config.exs @@ -257,16 +257,16 @@ config :pleroma, :instance, password_reset_token_validity: 60 * 60 * 24, profile_directory: true, admin_privileges: [ - :user_deletion, - :user_credentials, - :statuses_read, - :user_tag, - :user_activation, - :user_invite, - :report_handle, - :user_read, - :status_delete, - :emoji_management + :users_delete, + :users_manage_credentials, + :messages_read, + :users_manage_tags, + :users_manage_activation_state, + :users_manage_invites, + :reports_manage_reports, + :users_read, + :messages_delete, + :emoji_manage_emoji ], moderator_privileges: [], max_endorsed_users: 20, diff --git a/config/description.exs b/config/description.exs index 9f595fae0..e5a49139e 100644 --- a/config/description.exs +++ b/config/description.exs @@ -964,16 +964,16 @@ config :pleroma, :config_description, [ key: :admin_privileges, type: {:list, :atom}, suggestions: [ - :user_deletion, - :user_credentials, - :statuses_read, - :user_tag, - :user_activation, - :user_invite, - :report_handle, - :user_read, - :status_delete, - :emoji_management + :users_delete, + :users_manage_credentials, + :messages_read, + :users_manage_tags, + :users_manage_activation_state, + :users_manage_invites, + :reports_manage_reports, + :users_read, + :messages_delete, + :emoji_manage_emoji ], 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)" @@ -982,16 +982,16 @@ config :pleroma, :config_description, [ key: :moderator_privileges, type: {:list, :atom}, suggestions: [ - :user_deletion, - :user_credentials, - :statuses_read, - :user_tag, - :user_activation, - :user_invite, - :report_handle, - :user_read, - :status_delete, - :emoji_management + :users_delete, + :users_manage_credentials, + :messages_read, + :users_manage_tags, + :users_manage_activation_state, + :users_manage_invites, + :reports_manage_reports, + :users_read, + :messages_delete, + :emoji_manage_emoji ], 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)" -- cgit v1.2.3 From c0e4b1b3e27a4a8f8f02ea6a33b76c6f2a386d95 Mon Sep 17 00:00:00 2001 From: Ilja Date: Sat, 2 Jul 2022 07:52:39 +0200 Subject: Fix typo's priviledge |-> privilege --- config/description.exs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'config') diff --git a/config/description.exs b/config/description.exs index e5a49139e..e2ff91fb3 100644 --- a/config/description.exs +++ b/config/description.exs @@ -976,7 +976,7 @@ config :pleroma, :config_description, [ :emoji_manage_emoji ], 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)" + "What extra privileges to allow admins (e.g. updating user credentials, get password reset token, delete users, index and read private statuses and chats)" }, %{ key: :moderator_privileges, @@ -994,7 +994,7 @@ config :pleroma, :config_description, [ :emoji_manage_emoji ], 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)" + "What extra privileges to allow moderators (e.g. updating user credentials, get password reset token, delete users, index and read private statuses and chats)" }, %{ key: :birthday_required, -- cgit v1.2.3 From 51f87ba30cf20a1ca6bc19d2229913d8e1eecda5 Mon Sep 17 00:00:00 2001 From: Ilja Date: Sat, 2 Jul 2022 07:59:46 +0200 Subject: Change order of privilege tags to make more sense The tags were listed in different places They were listed in a rather randomly order I reordered them in a way I think makes more sense --- config/config.exs | 12 ++++++------ config/description.exs | 24 ++++++++++++------------ 2 files changed, 18 insertions(+), 18 deletions(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index 935d4fc98..eb56723fa 100644 --- a/config/config.exs +++ b/config/config.exs @@ -257,15 +257,15 @@ config :pleroma, :instance, password_reset_token_validity: 60 * 60 * 24, profile_directory: true, admin_privileges: [ - :users_delete, + :users_read, + :users_manage_invites, + :users_manage_activation_state, + :users_manage_tags, :users_manage_credentials, + :users_delete, :messages_read, - :users_manage_tags, - :users_manage_activation_state, - :users_manage_invites, - :reports_manage_reports, - :users_read, :messages_delete, + :reports_manage_reports, :emoji_manage_emoji ], moderator_privileges: [], diff --git a/config/description.exs b/config/description.exs index e2ff91fb3..66ae53d42 100644 --- a/config/description.exs +++ b/config/description.exs @@ -964,15 +964,15 @@ config :pleroma, :config_description, [ key: :admin_privileges, type: {:list, :atom}, suggestions: [ - :users_delete, + :users_read, + :users_manage_invites, + :users_manage_activation_state, + :users_manage_tags, :users_manage_credentials, + :users_delete, :messages_read, - :users_manage_tags, - :users_manage_activation_state, - :users_manage_invites, - :reports_manage_reports, - :users_read, :messages_delete, + :reports_manage_reports, :emoji_manage_emoji ], description: @@ -982,15 +982,15 @@ config :pleroma, :config_description, [ key: :moderator_privileges, type: {:list, :atom}, suggestions: [ - :users_delete, + :users_read, + :users_manage_invites, + :users_manage_activation_state, + :users_manage_tags, :users_manage_credentials, + :users_delete, :messages_read, - :users_manage_tags, - :users_manage_activation_state, - :users_manage_invites, - :reports_manage_reports, - :users_read, :messages_delete, + :reports_manage_reports, :emoji_manage_emoji ], description: -- cgit v1.2.3 From 42d4bd3a5d49a472b8fcb85e6cd413eb0d6dab3f Mon Sep 17 00:00:00 2001 From: Ilja Date: Sat, 2 Jul 2022 08:55:14 +0200 Subject: Rename pipelines and add forgotten tags I renamed some tags before, but forgot to rename the pipelines I also had some tags which I forgot to add to the config, description, etc. These have now been done/added --- config/config.exs | 5 ++++- config/description.exs | 10 ++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index eb56723fa..994d333aa 100644 --- a/config/config.exs +++ b/config/config.exs @@ -265,8 +265,11 @@ config :pleroma, :instance, :users_delete, :messages_read, :messages_delete, + :instances_delete, :reports_manage_reports, - :emoji_manage_emoji + :moderation_log_read, + :emoji_manage_emoji, + :statistics_read ], moderator_privileges: [], max_endorsed_users: 20, diff --git a/config/description.exs b/config/description.exs index 66ae53d42..134cefa85 100644 --- a/config/description.exs +++ b/config/description.exs @@ -972,8 +972,11 @@ config :pleroma, :config_description, [ :users_delete, :messages_read, :messages_delete, + :instances_delete, :reports_manage_reports, - :emoji_manage_emoji + :moderation_log_read, + :emoji_manage_emoji, + :statistics_read ], description: "What extra privileges to allow admins (e.g. updating user credentials, get password reset token, delete users, index and read private statuses and chats)" @@ -990,8 +993,11 @@ config :pleroma, :config_description, [ :users_delete, :messages_read, :messages_delete, + :instances_delete, :reports_manage_reports, - :emoji_manage_emoji + :moderation_log_read, + :emoji_manage_emoji, + :statistics_read ], description: "What extra privileges to allow moderators (e.g. updating user credentials, get password reset token, delete users, index and read private statuses and chats)" -- cgit v1.2.3 From c045a49909c2a1078864484d0327e03dac73687b Mon Sep 17 00:00:00 2001 From: Ilja Date: Thu, 14 Jul 2022 08:40:26 +0200 Subject: Add privilege for announcements --- config/config.exs | 1 + config/description.exs | 2 ++ 2 files changed, 3 insertions(+) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index b0b43e75a..6c5ac2ceb 100644 --- a/config/config.exs +++ b/config/config.exs @@ -269,6 +269,7 @@ config :pleroma, :instance, :instances_delete, :reports_manage_reports, :moderation_log_read, + :announcements_manage_announcements, :emoji_manage_emoji, :statistics_read ], diff --git a/config/description.exs b/config/description.exs index 2e7f06f81..b53354a79 100644 --- a/config/description.exs +++ b/config/description.exs @@ -984,6 +984,7 @@ config :pleroma, :config_description, [ :instances_delete, :reports_manage_reports, :moderation_log_read, + :announcements_manage_announcements, :emoji_manage_emoji, :statistics_read ], @@ -1005,6 +1006,7 @@ config :pleroma, :config_description, [ :instances_delete, :reports_manage_reports, :moderation_log_read, + :announcements_manage_announcements, :emoji_manage_emoji, :statistics_read ], -- cgit v1.2.3 From b53cf7d4b3991bde21e05277d7fb2ee01bf57f46 Mon Sep 17 00:00:00 2001 From: Ilja Date: Sun, 7 Aug 2022 07:22:33 +0200 Subject: Change default moderator privileges to better match what we previously had Moderators were able to delete statusses via pleroma-fe. For that reason I now gave them :messages_delete by default. They are also able to recieve reports through the notifications. For that reason I now gave them :reports_manage_reports by default. They were also able to see deactivated accounts through pleroma-fe. However * they were unable to tell if the account is deactivated or not (which was a bug and fixed by thes privileges MR this commit is part of) * they were not able to actually change the activation state. Because of this, I decided to *not* give them the privilege :users_manage_activation_state as this would give significantly more privileges, while not giving it will actually improve the current experience as it works around the existing bug of not showing activation state. --- config/config.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index 6c5ac2ceb..7f2927e37 100644 --- a/config/config.exs +++ b/config/config.exs @@ -273,7 +273,7 @@ config :pleroma, :instance, :emoji_manage_emoji, :statistics_read ], - moderator_privileges: [], + moderator_privileges: [:messages_delete, :reports_manage_reports], max_endorsed_users: 20, birthday_required: false, birthday_min_age: 0, -- cgit v1.2.3 From 179efd94677d1d30bdbbbbaafc899c8c908181d2 Mon Sep 17 00:00:00 2001 From: tusooa Date: Sat, 24 Dec 2022 00:17:17 -0500 Subject: Make backup parameters configurable --- config/config.exs | 4 +++- config/description.exs | 15 +++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index e41ec2f91..ecb592b9c 100644 --- a/config/config.exs +++ b/config/config.exs @@ -874,7 +874,9 @@ config :pleroma, Pleroma.Web.Auth.Authenticator, Pleroma.Web.Auth.PleromaAuthent config :pleroma, Pleroma.User.Backup, purge_after_days: 30, limit_days: 7, - dir: nil + dir: nil, + process_wait_time: 30_000, + process_chunk_size: 100 config :pleroma, ConcurrentLimiter, [ {Pleroma.Web.RichMedia.Helpers, [max_running: 5, max_waiting: 5]}, diff --git a/config/description.exs b/config/description.exs index bf4734426..996267558 100644 --- a/config/description.exs +++ b/config/description.exs @@ -3394,6 +3394,21 @@ config :pleroma, :config_description, [ type: :integer, description: "Limit user to export not more often than once per N days", suggestions: [7] + }, + %{ + key: :process_wait_time, + type: :integer, + label: "Process Wait Time", + description: + "The amount of time to wait for backup to report progress, in milliseconds. If no progress is received from the backup job for that much time, terminate it and deem it failed.", + suggestions: [30_000] + }, + %{ + key: :process_chunk_size, + type: :integer, + label: "Process Chunk Size", + description: "The number of activities to fetch in the backup job for each chunk.", + suggestions: [100] } ] }, -- cgit v1.2.3 From bc7ec431795ffb096648902fdd30047cfdb64b4f Mon Sep 17 00:00:00 2001 From: tusooa Date: Thu, 26 Jan 2023 20:17:13 -0500 Subject: Allow customizing instance languages --- config/description.exs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'config') diff --git a/config/description.exs b/config/description.exs index bf4734426..78dc8770d 100644 --- a/config/description.exs +++ b/config/description.exs @@ -1052,6 +1052,15 @@ config :pleroma, :config_description, [ description: "Minimum required age (in days) for users to create account. Only used if birthday is required.", suggestions: [6570] + }, + %{ + key: :languages, + type: {:list, :string}, + description: + "Languages to be exposed in /api/v1/instance. Should be in the format of BCP47 language codes.", + suggestions: [ + "en" + ] } ] }, -- cgit v1.2.3 From 0231a09310895bd2af24eff221de97eb8c92307e Mon Sep 17 00:00:00 2001 From: duponin Date: Sun, 16 Apr 2023 15:50:32 +0200 Subject: Remove SSH/BBS feature from core And link to sshocial, the replacement client for this removed feature --- config/config.exs | 3 --- config/description.exs | 39 --------------------------------------- 2 files changed, 42 deletions(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index e41ec2f91..178b6be99 100644 --- a/config/config.exs +++ b/config/config.exs @@ -617,9 +617,6 @@ config :pleroma, :ldap, base: System.get_env("LDAP_BASE") || "dc=example,dc=com", uid: System.get_env("LDAP_UID") || "cn" -config :esshd, - enabled: false - oauth_consumer_strategies = System.get_env("OAUTH_CONSUMER_STRATEGIES") |> to_string() diff --git a/config/description.exs b/config/description.exs index 78dc8770d..5f8add8a4 100644 --- a/config/description.exs +++ b/config/description.exs @@ -2628,45 +2628,6 @@ config :pleroma, :config_description, [ } ] }, - %{ - group: :esshd, - label: "ESSHD", - type: :group, - description: - "Before enabling this you must add :esshd to mix.exs as one of the extra_applications " <> - "and generate host keys in your priv dir with ssh-keygen -m PEM -N \"\" -b 2048 -t rsa -f ssh_host_rsa_key", - children: [ - %{ - key: :enabled, - type: :boolean, - description: "Enables SSH" - }, - %{ - key: :priv_dir, - type: :string, - description: "Dir with SSH keys", - suggestions: ["/some/path/ssh_keys"] - }, - %{ - key: :handler, - type: :string, - description: "Handler module", - suggestions: ["Pleroma.BBS.Handler"] - }, - %{ - key: :port, - type: :integer, - description: "Port to connect", - suggestions: [10_022] - }, - %{ - key: :password_authenticator, - type: :string, - description: "Authenticator module", - suggestions: ["Pleroma.BBS.Authenticator"] - } - ] - }, %{ group: :mime, label: "Mime Types", -- cgit v1.2.3 From 28ff828caaada329283a37feb3940b543ef260a3 Mon Sep 17 00:00:00 2001 From: tusooa Date: Tue, 28 Feb 2023 10:40:24 -0500 Subject: Add emoji policy to remove emojis matching certain urls https://git.pleroma.social/pleroma/pleroma/-/issues/2775 --- config/config.exs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index a92ab574b..ebcbf8b49 100644 --- a/config/config.exs +++ b/config/config.exs @@ -408,6 +408,12 @@ config :pleroma, :mrf_keyword, federated_timeline_removal: [], replace: [] +config :pleroma, :mrf_emoji, + remove_url: [], + remove_shortcode: [], + federated_timeline_removal_url: [], + federated_timeline_removal_shortcode: [] + config :pleroma, :mrf_hashtag, sensitive: ["nsfw"], reject: [], -- cgit v1.2.3 From 57ef1d121101d785c043ef6aaf2d33bb9be3ec3b Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Mon, 24 Jan 2022 16:44:35 -0600 Subject: Add InlineQuotePolicy to force quote URLs inline --- config/config.exs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index ebcbf8b49..56cc34db5 100644 --- a/config/config.exs +++ b/config/config.exs @@ -434,6 +434,8 @@ config :pleroma, :mrf_object_age, config :pleroma, :mrf_follow_bot, follower_nickname: nil +config :pleroma, :mrf_inline_quote, prefix: "RT" + config :pleroma, :rich_media, enabled: true, ignore_hosts: [], -- cgit v1.2.3 From 93e4972b50f9bb0a07a7074fbab2aedbdc0cc4eb Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Thu, 27 Jan 2022 15:01:20 -0600 Subject: Add InlineQuotePolicy as a default MRF --- config/config.exs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index 56cc34db5..9149e925a 100644 --- a/config/config.exs +++ b/config/config.exs @@ -860,7 +860,11 @@ config :pleroma, :restrict_unauthenticated, config :pleroma, Pleroma.Web.ApiSpec.CastAndValidate, strict: false config :pleroma, :mrf, - policies: [Pleroma.Web.ActivityPub.MRF.ObjectAgePolicy, Pleroma.Web.ActivityPub.MRF.TagPolicy], + policies: [ + Pleroma.Web.ActivityPub.MRF.ObjectAgePolicy, + Pleroma.Web.ActivityPub.MRF.TagPolicy, + Pleroma.Web.ActivityPub.MRF.InlineQuotePolicy + ], transparency: true, transparency_exclusions: [] -- cgit v1.2.3 From 163e5637335f9454688d3cc83530f82fc640a5b9 Mon Sep 17 00:00:00 2001 From: tusooa Date: Wed, 12 Jul 2023 09:30:43 -0400 Subject: Allow more flexibility in InlineQuotePolicy --- config/config.exs | 2 +- config/description.exs | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index 9149e925a..e8ae31542 100644 --- a/config/config.exs +++ b/config/config.exs @@ -434,7 +434,7 @@ config :pleroma, :mrf_object_age, config :pleroma, :mrf_follow_bot, follower_nickname: nil -config :pleroma, :mrf_inline_quote, prefix: "RT" +config :pleroma, :mrf_inline_quote, template: "RT: {url}" config :pleroma, :rich_media, enabled: true, diff --git a/config/description.exs b/config/description.exs index d18649ae8..079d187d5 100644 --- a/config/description.exs +++ b/config/description.exs @@ -2994,6 +2994,24 @@ config :pleroma, :config_description, [ } ] }, + %{ + group: :pleroma, + key: :mrf_inline_quote, + tab: :mrf, + related_policy: "Pleroma.Web.ActivityPub.MRF.InlineQuotePolicy", + label: "MRF Inline Quote Policy", + type: :group, + description: "Force quote url to appear in post content.", + children: [ + %{ + key: :template, + type: :string, + description: + "The template to append to the post. `{url}` will be replaced with the actual link to the quoted post.", + suggestions: ["RT: {url}"] + } + ] + }, %{ group: :pleroma, key: :modules, -- cgit v1.2.3 From 87353e5ad12799d12507253fe9a0363fd9f0c817 Mon Sep 17 00:00:00 2001 From: tusooa Date: Wed, 12 Jul 2023 22:07:16 -0400 Subject: Fix config descriptions for mrf inline quote --- config/description.exs | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'config') diff --git a/config/description.exs b/config/description.exs index 079d187d5..d18649ae8 100644 --- a/config/description.exs +++ b/config/description.exs @@ -2994,24 +2994,6 @@ config :pleroma, :config_description, [ } ] }, - %{ - group: :pleroma, - key: :mrf_inline_quote, - tab: :mrf, - related_policy: "Pleroma.Web.ActivityPub.MRF.InlineQuotePolicy", - label: "MRF Inline Quote Policy", - type: :group, - description: "Force quote url to appear in post content.", - children: [ - %{ - key: :template, - type: :string, - description: - "The template to append to the post. `{url}` will be replaced with the actual link to the quoted post.", - suggestions: ["RT: {url}"] - } - ] - }, %{ group: :pleroma, key: :modules, -- cgit v1.2.3 From bf426c53b4e1c025d7857adf485976421175cdf6 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Tue, 7 Nov 2023 15:11:14 -0500 Subject: Fix digest email processing, consolidate Oban queues The email related jobs can all share a single Oban queue --- config/config.exs | 1 - 1 file changed, 1 deletion(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index e8ae31542..ad3a98f46 100644 --- a/config/config.exs +++ b/config/config.exs @@ -590,7 +590,6 @@ config :pleroma, Oban, background: 5, remote_fetcher: 2, attachments_cleanup: 1, - new_users_digest: 1, mute_expire: 5 ], plugins: [Oban.Plugins.Pruner], -- cgit v1.2.3