From de7badc58326a6376e2a340c61a6985f74f83b02 Mon Sep 17 00:00:00 2001 From: muppeth Date: Tue, 4 Jun 2024 21:51:12 +0200 Subject: [PATCH 1/4] Update to version 2.0.3 (#26) Co-authored-by: meaz Reviewed-on: https://git.disroot.org/Disroot-Ansible/etherpad/pulls/26 Reviewed-by: meaz Co-authored-by: muppeth Co-committed-by: muppeth --- defaults/main.yml | 3 +- .../var/www/etherpad-lite/settings.json.j2 | 38 +++++++++++++++++++ 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/defaults/main.yml b/defaults/main.yml index 2f1090e..467bd11 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,6 +1,6 @@ --- -etherpad_version: '2.0.2' +etherpad_version: '2.1.0' etherpad_skin: 'colibris' etherpad_skinVariants: 'super-light-toolbar super-light-editor light-background' etherpad_username: 'etherpad' @@ -27,6 +27,7 @@ etherpad_indentationOnNewLine: 'false' etherpad_importExportRateLimitingwindowMs: '90000' etherpad_importExportRateLimitingMax: '10' etherpad_importMaxFileSize: '52428800' # 50 MB -> 50 * 1024 * 1024 +etherpad_authmethod: 'sso' etherpad_exposeVersion: 'false' etherpad_js_maxage: '21600' etherpad_max_log_size: '1024' diff --git a/templates/var/www/etherpad-lite/settings.json.j2 b/templates/var/www/etherpad-lite/settings.json.j2 index 5750f45..647ac99 100644 --- a/templates/var/www/etherpad-lite/settings.json.j2 +++ b/templates/var/www/etherpad-lite/settings.json.j2 @@ -600,6 +600,13 @@ */ "importMaxFileSize": {{ etherpad_importMaxFileSize }}, // 50 * 1024 * 1024 + /* + The authentication method used by the server. + The default value is sso + If you want to use the old authentication system, change this to apikey + */ + "authenticationMethod": "${AUTHENTICATION_METHOD:{{ etherpad_authmethod }}}", + /* * From Etherpad 1.8.5 onwards, when Etherpad is in production mode commits from individual users are rate limited * @@ -665,4 +672,35 @@ * Enable/Disable case-insensitive pad names. */ "lowerCasePadIds": false + + /*"sso": { + "issuer": "${SSO_ISSUER:http://localhost:9001}", + "clients": [ + { + "client_id": "${ADMIN_CLIENT:admin_client}", + "client_secret": "${ADMIN_SECRET:admin}", + "grant_types": ["authorization_code"], + "response_types": ["code"], + "redirect_uris": ["${ADMIN_REDIRECT:http://localhost:9001/admin/}"] + }, + { + "client_id": "${USER_CLIENT:user_client}", + "client_secret": "${USER_SECRET:user}", + "grant_types": ["authorization_code"], + "response_types": ["code"], + "redirect_uris": ["${USER_REDIRECT:http://localhost:9001/}"] + } + ] + } + */ + /* Set the time to live for the tokens + This is the time of seconds a user is logged into Etherpad + "ttl": { + "AccessToken": 3600, + "AuthorizationCode": 600, + "ClientCredentials": 3600, + "IdToken": 3600, + "RefreshToken": 86400 + } + */ } -- 2.39.5 From 8fbf72e5e546390202c48b1ca9ca12d0529eccfb Mon Sep 17 00:00:00 2001 From: meaz Date: Sun, 9 Jun 2024 10:11:46 +0200 Subject: [PATCH 2/4] update readme --- README.MD | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.MD b/README.MD index 89d7da7..bd80b80 100644 --- a/README.MD +++ b/README.MD @@ -19,10 +19,9 @@ You can use tags when you deploy: - `config`: to deploy just config - `modules`: to deploy modules -⚠ Since the v.2.0.2, modules can only be installed, not removed. The devs are working on this: https://github.com/ether/etherpad-lite/issues/6272 So if you need to remove a plugin, log into the admin interface. - ## CHANGELOG +- **09.06.2024** - Add possibility to remove plugin - **14.04.2024** - Bumped version to 2.0.2 and change from npm to pnpm - **26.03.2021** - Bumped version to 1.8.13 and enable ep_adminpads2 - **04.03.2021** - Bumped version to 1.8.11 and adjusted readme file -- 2.39.5 From f2fbd5f86a599ac406826c187e633f35beed4c56 Mon Sep 17 00:00:00 2001 From: meaz Date: Sun, 9 Jun 2024 10:12:01 +0200 Subject: [PATCH 3/4] add info about how to remove modules --- defaults/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/defaults/main.yml b/defaults/main.yml index 467bd11..1f7b761 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -59,7 +59,7 @@ etherpad_apt: etherpad_admin_page: 'true' # set to something else if you don't want to build admin page -etherpad_plugins_list: +etherpad_plugins_list: # set to "removed" if you want to remove à plugin ep_adminpads2: enabled ep_comments_page: enabled ep_desktop_notifications: enabled -- 2.39.5 From ddc835a399feb5fe0308a41dd56a7ba4dd01a616 Mon Sep 17 00:00:00 2001 From: meaz Date: Sun, 9 Jun 2024 10:12:09 +0200 Subject: [PATCH 4/4] add task to remove modules --- tasks/modules.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tasks/modules.yml b/tasks/modules.yml index 419022c..fc5c35b 100644 --- a/tasks/modules.yml +++ b/tasks/modules.yml @@ -11,6 +11,18 @@ become: yes become_user: "{{ etherpad_username }}" when: etherpad_plugins_list| dict2items | selectattr('value', 'eq', 'enabled') |length > 0 + notify: + restart etherpad + tags: modules + +- name: '[Modules] - Remove modules' + shell: + cmd: "pnpm run plugins rm {{ etherpad_plugins_list| dict2items | selectattr('value', 'eq', 'removed') | map(attribute='key') |join(',') | replace(\",\", \" \") }}" + args: + chdir: "{{ etherpad_app_dir }}/app" + become: yes + become_user: "{{ etherpad_username }}" + when: etherpad_plugins_list| dict2items | selectattr('value', 'eq', 'removed') |length > 0 notify: restart etherpad tags: modules \ No newline at end of file -- 2.39.5