From b60cd7635035808e086e3bb78f15faa5a7bb192e Mon Sep 17 00:00:00 2001 From: Angelina Filippova Date: Fri, 31 Jul 2020 20:10:44 +0300 Subject: [PATCH] Add :restrict_unauthenticated setting on Authentication tab --- src/views/settings/components/Authentication.vue | 12 +++++++++++- src/views/settings/components/tabs.js | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/views/settings/components/Authentication.vue b/src/views/settings/components/Authentication.vue index 8ad33f88..3e919c11 100644 --- a/src/views/settings/components/Authentication.vue +++ b/src/views/settings/components/Authentication.vue @@ -11,10 +11,14 @@ - + + + + +
Submit
@@ -81,6 +85,12 @@ export default { }, pleromaAuthenticatorData() { return _.get(this.settings.settings, [':pleroma', 'Pleroma.Web.Auth.Authenticator']) || {} + }, + restrictUnauthenticated() { + return this.settings.description.find(setting => setting.key === ':restrict_unauthenticated') + }, + restrictUnauthenticatedData() { + return _.get(this.settings.settings, [':pleroma', ':restrict_unauthenticated']) || {} } }, methods: { diff --git a/src/views/settings/components/tabs.js b/src/views/settings/components/tabs.js index d58b2d1a..9a5f9b4e 100644 --- a/src/views/settings/components/tabs.js +++ b/src/views/settings/components/tabs.js @@ -6,7 +6,7 @@ export const tabs = description => { }, 'authentication': { label: 'settings.auth', - settings: [':auth', ':ldap', ':oauth2', 'Pleroma.Web.Auth.Authenticator'] + settings: [':auth', ':ldap', ':oauth2', 'Pleroma.Web.Auth.Authenticator', ':restrict_unauthenticated'] }, 'esshd': { label: 'settings.esshd',