Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Schwan <carl@carlschwan.eu>2022-07-13 19:31:04 +0300
committerGitHub <noreply@github.com>2022-07-13 19:31:04 +0300
commitd7bd6f0e2ac1bd599ddf9a058cef0f7032138016 (patch)
treed1cd87dcef5c65b2e0ade37a84d1f6548ae44b98
parent62fad0972dcf7576bb5da5b392b16b2cbe721e24 (diff)
parent4e0574e184bb3fa915da88d45f909982f2be8c13 (diff)
Merge pull request #32506 from nextcloud/port/vue-encryption
Port encryption admin settings to vue
-rw-r--r--apps/settings/appinfo/routes.php1
-rw-r--r--apps/settings/css/settings.css16
-rw-r--r--apps/settings/css/settings.css.map2
-rw-r--r--apps/settings/css/settings.scss16
-rw-r--r--apps/settings/lib/Settings/Admin/Security.php27
-rw-r--r--apps/settings/src/admin.js31
-rw-r--r--apps/settings/src/components/Encryption.vue209
-rw-r--r--apps/settings/src/main-admin-security.js4
-rw-r--r--apps/settings/templates/settings/admin/security.php79
-rw-r--r--apps/settings/tests/Settings/Admin/SecurityTest.php14
-rw-r--r--apps/theming/css/default.css3
-rw-r--r--apps/theming/lib/Themes/DefaultTheme.php3
-rw-r--r--dist/settings-legacy-admin.js4
-rw-r--r--dist/settings-legacy-admin.js.map2
-rw-r--r--dist/settings-vue-settings-admin-security.js4
-rw-r--r--dist/settings-vue-settings-admin-security.js.map2
16 files changed, 239 insertions, 178 deletions
diff --git a/apps/settings/appinfo/routes.php b/apps/settings/appinfo/routes.php
index cb503961ed2..938842dd576 100644
--- a/apps/settings/appinfo/routes.php
+++ b/apps/settings/appinfo/routes.php
@@ -40,7 +40,6 @@ return [
['name' => 'MailSettings#setMailSettings', 'url' => '/settings/admin/mailsettings', 'verb' => 'POST' , 'root' => ''],
['name' => 'MailSettings#storeCredentials', 'url' => '/settings/admin/mailsettings/credentials', 'verb' => 'POST' , 'root' => ''],
['name' => 'MailSettings#sendTestMail', 'url' => '/settings/admin/mailtest', 'verb' => 'POST' , 'root' => ''],
- ['name' => 'Encryption#startMigration', 'url' => '/settings/admin/startmigration', 'verb' => 'POST' , 'root' => ''],
['name' => 'AppSettings#listCategories', 'url' => '/settings/apps/categories', 'verb' => 'GET' , 'root' => ''],
['name' => 'AppSettings#viewApps', 'url' => '/settings/apps', 'verb' => 'GET' , 'root' => ''],
diff --git a/apps/settings/css/settings.css b/apps/settings/css/settings.css
index 199ec9e895e..d363f869cf3 100644
--- a/apps/settings/css/settings.css
+++ b/apps/settings/css/settings.css
@@ -1154,17 +1154,10 @@ table.grid td.date {
#two-factor-auth h2,
#shareAPI h2,
-#encryptionAPI h2,
#mail_general_settings h2 {
display: inline-block;
}
-#encryptionAPI li {
- list-style-type: initial;
- margin-left: 20px;
- padding: 5px 0;
-}
-
.mail_settings p label:first-child {
display: inline-block;
width: 300px;
@@ -1270,15 +1263,6 @@ doesnotexist:-o-prefocus, .strengthify-wrapper {
padding: 3px 0;
}
-#selectEncryptionModules {
- margin-left: 30px;
- padding: 10px;
-}
-
-#encryptionModules {
- padding: 10px;
-}
-
#warning {
color: red;
}
diff --git a/apps/settings/css/settings.css.map b/apps/settings/css/settings.css.map
index 9d35a833c5a..8065e4fe436 100644
--- a/apps/settings/css/settings.css.map
+++ b/apps/settings/css/settings.css.map
@@ -1 +1 @@
-{"version":3,"sourceRoot":"","sources":["../../../core/css/variables.scss","settings.scss","../../../core/css/functions.scss"],"names":[],"mappings":";AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA;AAAA;AAAA;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAsBA;AAAA;AAAA;AA4BA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AD3CC;EACC;;;AAIF;AACA;EACC;;;AAGD;AACA;AC6CC;EAEA;;;AD3CD;ACyCC;EAEA;;;ADvCD;ACqCC;EAEA;;;ADnCD;ACiCC;EAEA;;;AD/BD;AC6BC;EAEA;;;AD1BA;EACC;;AAGD;EACC;;AAGD;EACC;;;AAIF;EACC;;;AAGD;EACC;;;AAED;EACC;;;AAGD;EACC;;;AAGD;EACC;EACA;AACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACC;AACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;AAAA;AAAA;EAGC;;AAGD;EACC;;AAGD;EACC;;;AAKH;EACC;EACA;EACA;EACA;;;AAGD;EACC;EACA;EACA;;AAGC;EACC;;;AAKH;EACC;;;AAIA;EACC;;AAEA;EACC;;AAIA;EACC;;;AAOH;EAGC;;;AAIF;EACC;EACA;EACA;EACA;;AAEA;EACC;EACA;;AAEA;EACC;;AAIF;EACC;EACA;EACA;;AAGD;EACC;EACA;EACA;;;AAMF;EACC;;AACA;EACC;;AACA;EACC;;;AAKH;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EAGC;EACA;EACA;;AAGD;EACC;EACA;;;AAMF;EACC;IACC;IACA;;EAEA;IACC;IACA;;EAGD;IACC;IACA;;EAGD;IACC;IACA;IACA;;;AAKH;EACC;IACC;IACA;;EAEA;IACC;;EAGD;IACC;IACA;;EAGD;IACC;IACA;;;AAKH;EACC;IACC;IACA;;EAEA;IACC;;EAGD;IACC;IACA;;EAGD;IACC;IACA;;;AAKH;EACC;EACA;EACA;;AAEA;EACC;;AAIA;EACC;EACA;EACA;EACA;EACA;;AAEA;EACC;EACA;EACA;;AAKD;EACC;EACA;EACA;EACA;EACA;;AAKH;EACC;EACA;EACA;EACA;;AAEA;EACC;;AAIF;EACC;;AAGD;EACC;EACA;EACA;EACA;;;AAKF;EACC;EACA;;AAEA;EACC;;AAEA;EACC;;AAGD;EACC;;AAIF;EACC;EACA;;;AAKF;AACA;AACA;EACC;EACA;EACA;EACA;;AAEA;EACC;;AAGD;EACC;EACA;EACA;;;AAIF;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EAEC;EACA;;AAEA;EACC;;AAIF;EACC;EACA;EACA;EACA;EACA;;AAEA;EACC;EACA;EACA;;AAIF;EACC;;AAGC;EAEC;EACA;;AAEA;EACC;;AAGD;EACC;;AAEA;EACC;;AAIF;EACC;EAEA;;AAEA;EACC;;;AAQN;EACC;;;AAGD;EACC;;;AAIA;EACC;;AAGD;EACC;;;AAIF;AAAA;EAEC;;;AAGD;EACC;;;AAGD;EACC;;;AAIA;EACC;EACA;EACA;;AAGD;EACC;EACA;EACA;;;AAMD;EACC;;AAGD;EACC;;;AAKD;EACC;EACA;;AAEA;EACC;EACA;EACA;;AAGD;EACC;;AAGD;EACC;;AAGD;EACC;EACA;EACA;EACA;EACA;EACA;EACA;;;AAKH;AAGC;EACC;;AAGD;EACC;;AAGD;EACC;EACA;EACA;;;AAIF;AAGC;EACC;EACA;EACA;EACA;;AAGD;EACC;;;AAKD;AAAA;EAEC;;;AAKD;AAAA;EAEC;;;AAIF;EACC;EACA;EACA;;AAEA;EACC;;AAGD;EACC;;;AAIF;AACA;EACC;;AAEA;EACC;EACA;EACA;EACA;EACA;EACA;EACA;;AAGD;EACC;EACA;EACA;EACA;EACA;;;AAKD;EACC;EACA;EACA;EACA;EACA;;AAGD;EACC;;AAEA;EACC;;AAIF;EACC;;AAGD;EAEC;EACA;EACA;;AAEA;EACC;EACA;EACA;EACA;;AAIF;EACC;;AAGD;EACC;EACA;;;AAIF;EACC;;;AAGD;AACA;EACC;EACA;EACA;;;AAGD;EACC;;;AAGD;EACC;;;AAGD;AACC;;AACA;EACC;EACA;EACA;;AAGD;EACC;;AAIA;EACC;;AAIF;EACC;;AAGD;EACC;;AAGD;EACC;;;AAIF;EACC;EACA;EACA;;;AAGD;EACC;;;AAIA;EACC;EACA;EACA;EACA;EACA;;AAGD;EACC;EACA;EACA;;AAGD;EACC;EACA;EACA;;AAGD;EACC;EACA;EACA;EACA;EACA;;;AAIF;EACC;EACA;EACA;;;AAIA;EACC;;;AAMD;EACC;;AAGD;EACC;EACA;;AAGD;EACC;;AAGD;EACC;;AAGD;EACC;EACA;EACA;EACA;;AAGD;EACC;;AAGD;EACC;;;AAMA;AAAA;EAEC;EACA;EACA;EACA;EACA;;AAIF;EACC;EACA;;AAEA;AAAA;EAEC;;AAGD;EACC;;AAIF;EACC;;AAGD;EACC;;AAGD;EACC;;AAGD;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGD;EACC;EACA;;AAEA;EACC;;AAIF;EACC;EACA;;AAGD;AAAA;AAAA;AAAA;AAAA;EAKC;;;AAIF;EACC;IACC;;;EAED;IACC;;;AAIF;EACC;IACC;;;EAED;IACC;;;AAIF;EACC;IACC;;;EAED;IACC;;;AAIF;EACC;IACC;;;EAED;IACC;;;AAIF;EACC;IACC;;;AAIF;EACC;IACC;;;AAIF;AACA;EAEE;IACC;;;AAKH;EACC;IACC;;;AAIF;EACC;;;AAGD;EACC;AACA;AAKA;;AAJA;EACC;;AAID;EACC;;AAEA;EACC;EACA;EACA;;;AAKH;EACC;EACA;EACA;;;AAGD;EACC;EACA;EACA;EACA;;;AAGD;EACC;;;AAGD;EACC;EACA;EACA;EACA;;;AAGD;EACC;EACA;EACA;;;AAGD;EACC;;;AAGD;EACC;;;AAGD;AAEA;EACC;;;AAGD;EACC;;;AAGD;EACC;EACA;EACA;;;AAGD;EAwGC;EACA;EACA;AAkDA;;AAxJA;EACC;;AAGD;EACC;;AAGD;EACC;;AAGD;EACC,QAfgB;EAgBhB,SAjBiB;EAmBjB,cAlBgB;EAmBhB;EACA;EACA;EACA;EACA;EACA;;AAGD;EAQC;;AAPA;EACC;EACA;EACA;EACA,YAhCe;;AAqChB;EACC;EACA;EACA;;AAEA;EACC;EACA;EACA;EACA;EACA;EACA;EACA;;AAGD;EACC;;AAKF;EACC;;AAEA;EACC;;AAIF;EACC;EACA;EACA;;AAGD;AAAA;EAEC;EACA;EACA;EACA;EACA;EACA;;AAGD;EACC;;AAEA;EACC;EACA;EACA;;AAKH;EACC;EACA;AACA;EACA;EACA;EACA;;AAOD;EACC;;AAGD;EACC;EACA;;AAEA;EACC;EACA;;AAGD;EACC;;AAKD;EACC;;AAGD;EACC;;AAGD;EACC;;AAEA;EACC;;AAKD;EACC;;AAKD;EACC;;AAMH;EACC;EACA;;AAEA;EACC;EACA;;AAGD;EACC;EACA;EACA;EACA;;AAEA;EACC;EACA;EACA;;AAGD;EACC;;;AAQF;EACC;;;AAKH;AACA;EACC;EACA;;;AAGD;EACC;;;AAGD;EACC;;;AAGD;EACC;;;AAOA;AAAA;AAAA;AAAA;EACC;;AAEA;AAAA;AAAA;AAAA;EACC;;AAGD;AAAA;AAAA;AAAA;EACC;EACA;EACA;EACA;EACA;;AAGD;AAAA;AAAA;AAAA;EACC;;AAGD;AAAA;AAAA;AAAA;EACC;;AAGD;AAAA;AAAA;AAAA;EACC;;;AAMF;EACC;;AAGD;EACC;;AAGD;EACC;;AAGD;EACC;;AAGD;EACC;;;AAIF;EACC;;;AAGD;EACC;;;AAGD;EACC;AACA;EACA;EACA;EACA;EACA;;;AAGD;AAEA;EACC;EACA;EACA;;;AAGD;AAAA;AAAA;AAAA;EAIC;;;AAGD;EACC;EACA;EACA;;;AAIA;EACC;EACA;EACA;;AAGD;AAAA;EAEC;;;AAIF;EACC;;;AAGD;EACC;;;AAGD;EACC;EACA;EACA;EACA;;AAEA;EACC;;;AAIF;EACC;EACA;EACA;EACA;;;AAGD;EACC;EACA;;;AAIA;EACC;EACA;;AAGD;EACC;;AAGD;EACC;EACA;;;AAKF;AACA;EACC;EACA;;;AAGD;EACC;EACA;EACA;EACA;EACA;;;AAIA;EACC;EACA;;AAEA;EACC;;AAGD;EACC;;AAIF;EACC;EAC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AAAA;EACC;;AAIF;AAAA;AAAA;EACC;EACA;EACA;;AAEA;AAAA;AAAA;EACC;;AAIF;AAAA;AAAA;EACC;EACA;;AAEA;AAAA;AAAA;EACC;;AAGD;AAAA;AAAA;EACC;EACA;EACA;EACA;;AAEA;AAAA;AAAA;EACC;EACA;EACA;EACA;;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;EAGC;EACA;;AAKH;AAAA;AAAA;EACC;EACA;EACA;EACA;;AAEA;AAAA;AAAA;EACC;EACA;;AAMH;AAAA;AAAA;EACC;;AAKH;EACC;EACA;EACA;EACA;;AAGD;EACC;EACA;;;AAKH;EACI;;;AAGJ;EACE;IACE;;;AAGJ;EACE;IACE","file":"settings.css"} \ No newline at end of file
+{"version":3,"sourceRoot":"","sources":["../../../core/css/variables.scss","settings.scss","../../../core/css/functions.scss"],"names":[],"mappings":";AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA;AAAA;AAAA;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAsBA;AAAA;AAAA;AA4BA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AD3CC;EACC;;;AAIF;AACA;EACC;;;AAGD;AACA;AC6CC;EAEA;;;AD3CD;ACyCC;EAEA;;;ADvCD;ACqCC;EAEA;;;ADnCD;ACiCC;EAEA;;;AD/BD;AC6BC;EAEA;;;AD1BA;EACC;;AAGD;EACC;;AAGD;EACC;;;AAIF;EACC;;;AAGD;EACC;;;AAED;EACC;;;AAGD;EACC;;;AAGD;EACC;EACA;AACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACC;AACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;AAAA;AAAA;EAGC;;AAGD;EACC;;AAGD;EACC;;;AAKH;EACC;EACA;EACA;EACA;;;AAGD;EACC;EACA;EACA;;AAGC;EACC;;;AAKH;EACC;;;AAIA;EACC;;AAEA;EACC;;AAIA;EACC;;;AAOH;EAGC;;;AAIF;EACC;EACA;EACA;EACA;;AAEA;EACC;EACA;;AAEA;EACC;;AAIF;EACC;EACA;EACA;;AAGD;EACC;EACA;EACA;;;AAMF;EACC;;AACA;EACC;;AACA;EACC;;;AAKH;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EAGC;EACA;EACA;;AAGD;EACC;EACA;;;AAMF;EACC;IACC;IACA;;EAEA;IACC;IACA;;EAGD;IACC;IACA;;EAGD;IACC;IACA;IACA;;;AAKH;EACC;IACC;IACA;;EAEA;IACC;;EAGD;IACC;IACA;;EAGD;IACC;IACA;;;AAKH;EACC;IACC;IACA;;EAEA;IACC;;EAGD;IACC;IACA;;EAGD;IACC;IACA;;;AAKH;EACC;EACA;EACA;;AAEA;EACC;;AAIA;EACC;EACA;EACA;EACA;EACA;;AAEA;EACC;EACA;EACA;;AAKD;EACC;EACA;EACA;EACA;EACA;;AAKH;EACC;EACA;EACA;EACA;;AAEA;EACC;;AAIF;EACC;;AAGD;EACC;EACA;EACA;EACA;;;AAKF;EACC;EACA;;AAEA;EACC;;AAEA;EACC;;AAGD;EACC;;AAIF;EACC;EACA;;;AAKF;AACA;AACA;EACC;EACA;EACA;EACA;;AAEA;EACC;;AAGD;EACC;EACA;EACA;;;AAIF;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EAEC;EACA;;AAEA;EACC;;AAIF;EACC;EACA;EACA;EACA;EACA;;AAEA;EACC;EACA;EACA;;AAIF;EACC;;AAGC;EAEC;EACA;;AAEA;EACC;;AAGD;EACC;;AAEA;EACC;;AAIF;EACC;EAEA;;AAEA;EACC;;;AAQN;EACC;;;AAGD;EACC;;;AAIA;EACC;;AAGD;EACC;;;AAIF;AAAA;EAEC;;;AAGD;EACC;;;AAGD;EACC;;;AAIA;EACC;EACA;EACA;;AAGD;EACC;EACA;EACA;;;AAMD;EACC;;AAGD;EACC;;;AAKD;EACC;EACA;;AAEA;EACC;EACA;EACA;;AAGD;EACC;;AAGD;EACC;;AAGD;EACC;EACA;EACA;EACA;EACA;EACA;EACA;;;AAKH;AAGC;EACC;;AAGD;EACC;;AAGD;EACC;EACA;EACA;;;AAIF;AAGC;EACC;EACA;EACA;EACA;;AAGD;EACC;;;AAKD;AAAA;EAEC;;;AAKD;AAAA;EAEC;;;AAIF;EACC;EACA;EACA;;AAEA;EACC;;AAGD;EACC;;;AAIF;AACA;EACC;;AAEA;EACC;EACA;EACA;EACA;EACA;EACA;EACA;;AAGD;EACC;EACA;EACA;EACA;EACA;;;AAKD;EACC;EACA;EACA;EACA;EACA;;AAGD;EACC;;AAEA;EACC;;AAIF;EACC;;AAGD;EAEC;EACA;EACA;;AAEA;EACC;EACA;EACA;EACA;;AAIF;EACC;;AAGD;EACC;EACA;;;AAIF;EACC;;;AAGD;AACA;EACC;EACA;EACA;;;AAGD;EACC;;;AAGD;EACC;;;AAGD;AACC;;AACA;EACC;EACA;EACA;;AAGD;EACC;;AAIA;EACC;;AAIF;EACC;;AAGD;EACC;;AAGD;EACC;;;AAIF;EACC;EACA;EACA;;;AAGD;EACC;;;AAIA;EACC;EACA;EACA;EACA;EACA;;AAGD;EACC;EACA;EACA;;AAGD;EACC;EACA;EACA;;AAGD;EACC;EACA;EACA;EACA;EACA;;;AAIF;EACC;EACA;EACA;;;AAIA;EACC;;;AAMD;EACC;;AAGD;EACC;EACA;;AAGD;EACC;;AAGD;EACC;;AAGD;EACC;EACA;EACA;EACA;;AAGD;EACC;;AAGD;EACC;;;AAMA;AAAA;EAEC;EACA;EACA;EACA;EACA;;AAIF;EACC;EACA;;AAEA;AAAA;EAEC;;AAGD;EACC;;AAIF;EACC;;AAGD;EACC;;AAGD;EACC;;AAGD;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGD;EACC;EACA;;AAEA;EACC;;AAIF;EACC;EACA;;AAGD;AAAA;AAAA;AAAA;AAAA;EAKC;;;AAIF;EACC;IACC;;;EAED;IACC;;;AAIF;EACC;IACC;;;EAED;IACC;;;AAIF;EACC;IACC;;;EAED;IACC;;;AAIF;EACC;IACC;;;EAED;IACC;;;AAIF;EACC;IACC;;;AAIF;EACC;IACC;;;AAIF;AACA;EAEE;IACC;;;AAKH;EACC;IACC;;;AAIF;EACC;;;AAGD;EACC;AACA;AAKA;;AAJA;EACC;;AAID;EACC;;AAEA;EACC;EACA;EACA;;;AAKH;EACC;EACA;EACA;;;AAGD;EACC;EACA;EACA;EACA;;;AAGD;EACC;;;AAGD;EACC;EACA;EACA;EACA;;;AAGD;EACC;EACA;EACA;;;AAGD;EACC;;;AAGD;EACC;;;AAGD;AAEA;EACC;;;AAGD;EACC;;;AAGD;EACC;EACA;EACA;;;AAGD;EAwGC;EACA;EACA;AAkDA;;AAxJA;EACC;;AAGD;EACC;;AAGD;EACC;;AAGD;EACC,QAfgB;EAgBhB,SAjBiB;EAmBjB,cAlBgB;EAmBhB;EACA;EACA;EACA;EACA;EACA;;AAGD;EAQC;;AAPA;EACC;EACA;EACA;EACA,YAhCe;;AAqChB;EACC;EACA;EACA;;AAEA;EACC;EACA;EACA;EACA;EACA;EACA;EACA;;AAGD;EACC;;AAKF;EACC;;AAEA;EACC;;AAIF;EACC;EACA;EACA;;AAGD;AAAA;EAEC;EACA;EACA;EACA;EACA;EACA;;AAGD;EACC;;AAEA;EACC;EACA;EACA;;AAKH;EACC;EACA;AACA;EACA;EACA;EACA;;AAOD;EACC;;AAGD;EACC;EACA;;AAEA;EACC;EACA;;AAGD;EACC;;AAKD;EACC;;AAGD;EACC;;AAGD;EACC;;AAEA;EACC;;AAKD;EACC;;AAKD;EACC;;AAMH;EACC;EACA;;AAEA;EACC;EACA;;AAGD;EACC;EACA;EACA;EACA;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ACA;EACA;;AAID;EAMC;;AAIF;AAAA;AAAA;EAGC,WAjEkB;;AAmElB;AAAA;AAAA;EACC;EACA;EACA;;AAIF;EACC;EACA;;AAGD;EACC;EACA;EACA;EACA;EACA;EACA;;AAGD;EACC;EACA;;AAID;EACC;EACA;EACA;EACA;AAAc;EACd,KD16CY;;AC46CZ;EACC;;AAIF;EACC;EACA;;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUC;EACA;EACA;EACA;EACA;;AAKD;EACC;;AAGD;EACC;;AAIF;EACC;;AAGD;AAAA;AAAA;EAGC;EACA;EACA;EACA;AAaA;AA2GA;;AAtHA;AAAA;AAAA;EACC;EACA;;AAIA;AAAA;AAAA;AAAA;AAAA;EACC;;AAKF;AAAA;AAAA;EACC;EACA;;AAGD;AAAA;AAAA;EACC;;AAKA;AAAA;AAAA;AAAA;AAAA;EACC;EACA;;AAIF;AAAA;AAAA;AAAA;AAAA;AAEC;EACA;EACA;EACA;AACA;AAAA;AAAA;EAGA;EACA;EACA;EACA;;AAGD;AAAA;AAAA;EACC;EACA;EACA;EACA;;AAEA;AAAA;AAAA;EACC;EACA;EACA;;AAIF;AAAA;AAAA;EACC;EACA;;AAEA;AAAA;AAAA;EACC;;AAIF;AAAA;AAAA;EACC;EACA;EACA;;AAEA;AAAA;AAAA;EACC;;AAIF;AAAA;AAAA;EACC;EACA;;AAEA;AAAA;AAAA;EACC;;AAGD;AAAA;AAAA;EACC;EACA;EACA;EACA;;AAEA;AAAA;AAAA;EACC;EACA;EACA;EACA;;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;EAGC;EACA;;AAKH;AAAA;AAAA;EACC;EACA;EACA;EACA;;AAEA;AAAA;AAAA;EACC;EACA;;AAMH;AAAA;AAAA;EACC;;AAKH;EACC;EACA;EACA;EACA;;AAGD;EACC;EACA;;;AAKH;EACI;;;AAGJ;EACE;IACE;;;AAGJ;EACE;IACE","file":"settings.css"} \ No newline at end of file
diff --git a/apps/settings/css/settings.scss b/apps/settings/css/settings.scss
index 1b26fe16662..9f0ab432cc7 100644
--- a/apps/settings/css/settings.scss
+++ b/apps/settings/css/settings.scss
@@ -1312,17 +1312,10 @@ table.grid td.date {
#two-factor-auth h2,
#shareAPI h2,
-#encryptionAPI h2,
#mail_general_settings h2 {
display: inline-block;
}
-#encryptionAPI li {
- list-style-type: initial;
- margin-left: 20px;
- padding: 5px 0;
-}
-
.mail_settings p {
label:first-child {
display: inline-block;
@@ -1449,15 +1442,6 @@ doesnotexist:-o-prefocus, .strengthify-wrapper {
}
}
-#selectEncryptionModules {
- margin-left: 30px;
- padding: 10px;
-}
-
-#encryptionModules {
- padding: 10px;
-}
-
#warning {
color: red;
}
diff --git a/apps/settings/lib/Settings/Admin/Security.php b/apps/settings/lib/Settings/Admin/Security.php
index f84ef03b61b..63d3137a45c 100644
--- a/apps/settings/lib/Settings/Admin/Security.php
+++ b/apps/settings/lib/Settings/Admin/Security.php
@@ -68,26 +68,15 @@ class Security implements ISettings {
}
}
- $this->initialState->provideInitialState(
- 'mandatory2FAState',
- $this->mandatoryTwoFactor->getState()
- );
+ $this->initialState->provideInitialState('mandatory2FAState', $this->mandatoryTwoFactor->getState());
+ $this->initialState->provideInitialState('two-factor-admin-doc', $this->urlGenerator->linkToDocs('admin-2fa'));
+ $this->initialState->provideInitialState('encryption-enabled', $this->manager->isEnabled());
+ $this->initialState->provideInitialState('encryption-ready', $this->manager->isReady());
+ $this->initialState->provideInitialState('external-backends-enabled', count($this->userManager->getBackends()) > 1);
+ $this->initialState->provideInitialState('encryption-modules', $encryptionModuleList);
+ $this->initialState->provideInitialState('encryption-admin-doc', $this->urlGenerator->linkToDocs('admin-encryption'));
- $this->initialState->provideInitialState(
- 'two-factor-admin-doc',
- $this->urlGenerator->linkToDocs('admin-2fa')
- );
-
- $parameters = [
- // Encryption API
- 'encryptionEnabled' => $this->manager->isEnabled(),
- 'encryptionReady' => $this->manager->isReady(),
- 'externalBackendsEnabled' => count($this->userManager->getBackends()) > 1,
- // Modules
- 'encryptionModules' => $encryptionModuleList,
- ];
-
- return new TemplateResponse('settings', 'settings/admin/security', $parameters, '');
+ return new TemplateResponse('settings', 'settings/admin/security', [], '');
}
/**
diff --git a/apps/settings/src/admin.js b/apps/settings/src/admin.js
index 3ad922ed03f..e1151d95258 100644
--- a/apps/settings/src/admin.js
+++ b/apps/settings/src/admin.js
@@ -18,37 +18,6 @@ window.addEventListener('DOMContentLoaded', () => {
$('#shareAPI p:not(#enable)').toggleClass('hidden', !this.checked)
})
- $('#enableEncryption').change(() => {
- $('#encryptionAPI div#EncryptionWarning').toggleClass('hidden')
- })
-
- $('#reallyEnableEncryption').click(() => {
- $('#encryptionAPI div#EncryptionWarning').toggleClass('hidden')
- $('#encryptionAPI div#EncryptionSettingsArea').toggleClass('hidden')
- OCP.AppConfig.setValue('core', 'encryption_enabled', 'yes')
- $('#enableEncryption').attr('disabled', 'disabled')
- })
-
- $('#startmigration').click((event) => {
- $(window).on('beforeunload.encryption', (e) => {
- return t('settings', 'Migration in progress. Please wait until the migration is finished')
- })
- event.preventDefault()
- $('#startmigration').prop('disabled', true)
- OC.msg.startAction('#startmigration_msg', t('settings', 'Migration started …'))
- $.post(OC.generateUrl('/settings/admin/startmigration'), '', function(data) {
- OC.msg.finishedAction('#startmigration_msg', data)
- if (data.status === 'success') {
- $('#encryptionAPI div#selectEncryptionModules').toggleClass('hidden')
- $('#encryptionAPI div#migrationWarning').toggleClass('hidden')
- } else {
- $('#startmigration').prop('disabled', false)
- }
- $(window).off('beforeunload.encryption')
-
- })
- })
-
$('#shareapiExpireAfterNDays').on('input', function() {
this.value = this.value.replace(/\D/g, '')
})
diff --git a/apps/settings/src/components/Encryption.vue b/apps/settings/src/components/Encryption.vue
new file mode 100644
index 00000000000..aef44164e2f
--- /dev/null
+++ b/apps/settings/src/components/Encryption.vue
@@ -0,0 +1,209 @@
+<!--
+ - @copyright 2022 Carl Schwan <carl@carlschwan.eu>
+ -
+ - @author Carl Schwan <carl@carlschwan.eu>
+ -
+ - @license GNU AGPL version 3 or any later version
+ -
+ - This program is free software: you can redistribute it and/or modify
+ - it under the terms of the GNU Affero General Public License as
+ - published by the Free Software Foundation, either version 3 of the
+ - License, or (at your option) any later version.
+ -
+ - This program is distributed in the hope that it will be useful,
+ - but WITHOUT ANY WARRANTY; without even the implied warranty of
+ - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ - GNU Affero General Public License for more details.
+ -
+ - You should have received a copy of the GNU Affero General Public License
+ - along with this program. If not, see <http://www.gnu.org/licenses/>.
+ -
+-->
+
+<template>
+ <SettingsSection :title="t('settings', 'Server-side encryption')"
+ :description="t('settings', 'Server-side encryption makes it possible to encrypt files which are uploaded to this server. This comes with limitations like a performance penalty, so enable this only if needed.')"
+ :doc-url="encryptionAdminDoc">
+ <CheckboxRadioSwitch :checked="encryptionEnabled || shouldDisplayWarning"
+ :disabled="encryptionEnabled"
+ type="switch"
+ @update:checked="displayWarning">
+ {{ t('settings', 'Enable server-side encryption') }}
+ </CheckboxRadioSwitch>
+
+ <div v-if="shouldDisplayWarning && !encryptionEnabled" class="notecard warning" role="alert">
+ <p>{{ t('settings', 'Please read carefully before activating server-side encryption:') }}</p>
+ <ul>
+ <li>{{ t('settings', 'Once encryption is enabled, all files uploaded to the server from that point forward will be encrypted at rest on the server. It will only be possible to disable encryption at a later date if the active encryption module supports that function, and all pre-conditions (e.g. setting a recover key) are met.') }}</li>
+ <li>{{ t('settings', 'Encryption alone does not guarantee security of the system. Please see documentation for more information about how the encryption app works, and the supported use cases.') }}</li>
+ <li>{{ t('settings', 'Be aware that encryption always increases the file size.') }}</li>
+ <li>{{ t('settings', 'It is always good to create regular backups of your data, in case of encryption make sure to backup the encryption keys along with your data.') }}</li>
+ </ul>
+
+ <p class="margin-bottom">
+ {{ t('settings', 'This is the final warning: Do you really want to enable encryption?') }}
+ </p>
+ <Button type="primary"
+ @click="enableEncryption()">
+ {{ t('settings', "Enable encryption") }}
+ </Button>
+ </div>
+
+ <div v-if="encryptionEnabled">
+ <div v-if="encryptionReady">
+ <p v-if="encryptionModules.length === 0">
+ {{ t('settings', 'No encryption module loaded, please enable an encryption module in the app menu.') }}
+ </p>
+ <template v-else>
+ <h3>{{ t('settings', 'Select default encryption module:') }}</h3>
+ <fieldset>
+ <CheckboxRadioSwitch v-for="(module, id) in encryptionModules"
+ :key="id"
+ :checked.sync="defaultCheckedModule"
+ :value="id"
+ type="radio"
+ name="default_encryption_module"
+ @update:checked="checkDefaultModule">
+ {{ module.displayName }}
+ </CheckboxRadioSwitch>
+ </fieldset>
+ </template>
+ </div>
+
+ <div v-else-if="externalBackendsEnabled" v-html="migrationMessage" />
+ </div>
+ </SettingsSection>
+</template>
+
+<script>
+import axios from '@nextcloud/axios'
+import CheckboxRadioSwitch from '@nextcloud/vue/dist/Components/CheckboxRadioSwitch'
+import Button from '@nextcloud/vue/dist/Components/Button'
+import SettingsSection from '@nextcloud/vue/dist/Components/SettingsSection'
+import { loadState } from '@nextcloud/initial-state'
+import { getLoggerBuilder } from '@nextcloud/logger'
+
+import { generateOcsUrl } from '@nextcloud/router'
+import confirmPassword from '@nextcloud/password-confirmation'
+import { showError } from '@nextcloud/dialogs'
+
+const logger = getLoggerBuilder()
+ .setApp('settings')
+ .detectUser()
+ .build()
+
+export default {
+ name: 'Encryption',
+ components: {
+ CheckboxRadioSwitch,
+ SettingsSection,
+ Button,
+ },
+ data() {
+ const encryptionModules = loadState('settings', 'encryption-modules')
+ return {
+ encryptionReady: loadState('settings', 'encryption-ready'),
+ encryptionEnabled: loadState('settings', 'encryption-enabled'),
+ externalBackendsEnabled: loadState('settings', 'external-backends-enabled'),
+ encryptionAdminDoc: loadState('settings', 'encryption-admin-doc'),
+ encryptionModules,
+ shouldDisplayWarning: false,
+ migrating: false,
+ defaultCheckedModule: Object.entries(encryptionModules).find((module) => module[1].default)[0],
+ }
+ },
+ computed: {
+ migrationMessage() {
+ return t('settings', 'You need to migrate your encryption keys from the old encryption (ownCloud <= 8.0) to the new one. Please enable the "Default encryption module" and run {command}', {
+ command: '"occ encryption:migrate"',
+ })
+ },
+ },
+ methods: {
+ displayWarning() {
+ if (!this.encryptionEnabled) {
+ this.shouldDisplayWarning = !this.shouldDisplayWarning
+ } else {
+ this.encryptionEnabled = false
+ this.shouldDisplayWarning = false
+ }
+ },
+ async update(key, value) {
+ await confirmPassword()
+
+ const url = generateOcsUrl('/apps/provisioning_api/api/v1/config/apps/{appId}/{key}', {
+ appId: 'core',
+ key,
+ })
+
+ const stringValue = value ? 'yes' : 'no'
+ try {
+ const { data } = await axios.post(url, {
+ value: stringValue,
+ })
+ this.handleResponse({
+ status: data.ocs?.meta?.status,
+ })
+ } catch (e) {
+ this.handleResponse({
+ errorMessage: t('settings', 'Unable to update server side encryption config'),
+ error: e,
+ })
+ }
+ },
+ async checkDefaultModule() {
+ await this.update('default_encryption_module', this.defaultCheckedModule)
+ },
+ async enableEncryption() {
+ this.encryptionEnabled = true
+ await this.update('encryption_enabled', true)
+ },
+ async handleResponse({ status, errorMessage, error }) {
+ if (status !== 'ok') {
+ showError(errorMessage)
+ logger.error(errorMessage, { error })
+ }
+ },
+ },
+}
+</script>
+
+<style lang="scss" scoped>
+
+.notecard.success {
+ --note-background: rgba(var(--color-success-rgb), 0.2);
+ --note-theme: var(--color-success);
+}
+
+.notecard.error {
+ --note-background: rgba(var(--color-error-rgb), 0.2);
+ --note-theme: var(--color-error);
+}
+
+.notecard.warning {
+ --note-background: rgba(var(--color-warning-rgb), 0.2);
+ --note-theme: var(--color-warning);
+}
+
+#body-settings .notecard {
+ color: var(--color-text-light);
+ background-color: var(--note-background);
+ border: 1px solid var(--color-border);
+ border-left: 4px solid var(--note-theme);
+ border-radius: var(--border-radius);
+ box-shadow: rgba(43, 42, 51, 0.05) 0px 1px 2px 0px;
+ margin: 1rem 0;
+ margin-top: 1rem;
+ padding: 1rem;
+}
+
+li {
+ list-style-type: initial;
+ margin-left: 1rem;
+ padding: 0.25rem 0;
+}
+
+.margin-bottom {
+ margin-bottom: 0.75rem;
+}
+</style>
diff --git a/apps/settings/src/main-admin-security.js b/apps/settings/src/main-admin-security.js
index 8f01a1d3d52..bd586189743 100644
--- a/apps/settings/src/main-admin-security.js
+++ b/apps/settings/src/main-admin-security.js
@@ -26,6 +26,7 @@ import { loadState } from '@nextcloud/initial-state'
import Vue from 'vue'
import AdminTwoFactor from './components/AdminTwoFactor.vue'
+import Encryption from './components/Encryption.vue'
import store from './store/admin-security'
// eslint-disable-next-line camelcase
@@ -45,3 +46,6 @@ const View = Vue.extend(AdminTwoFactor)
new View({
store,
}).$mount('#two-factor-auth-settings')
+
+const EncryptionView = Vue.extend(Encryption)
+new EncryptionView().$mount('#vue-admin-encryption')
diff --git a/apps/settings/templates/settings/admin/security.php b/apps/settings/templates/settings/admin/security.php
index e285e393e20..a7ee26b3d70 100644
--- a/apps/settings/templates/settings/admin/security.php
+++ b/apps/settings/templates/settings/admin/security.php
@@ -1,6 +1,7 @@
<?php
/**
* @copyright Copyright (c) 2016 Arthur Schiwon <blizzz@arthur-schiwon.de>
+ * @copyright 2022 Carl Schwan <carl@carlschwan.eu>
*
* @author Arthur Schiwon <blizzz@arthur-schiwon.de>
*
@@ -21,83 +22,9 @@
*
*/
-/** @var \OCP\IL10N $l */
-/** @var array $_ */
-
-script('settings', 'vue-settings-admin-security');
-
+\OCP\Util::addScript('settings', 'vue-settings-admin-security');
?>
<div id="two-factor-auth-settings"></div>
-<div class="section" id='encryptionAPI'>
- <h2><?php p($l->t('Server-side encryption')); ?></h2>
- <a target="_blank" rel="noreferrer noopener" class="icon-info"
- title="<?php p($l->t('Open documentation'));?>"
- href="<?php p(link_to_docs('admin-encryption')); ?>"></a>
- <p class="settings-hint"><?php p($l->t('Server-side encryption makes it possible to encrypt files which are uploaded to this server. This comes with limitations like a performance penalty, so enable this only if needed.')); ?></p>
- <p id="enable">
- <input type="checkbox"
- id="enableEncryption" class="checkbox"
- value="1" <?php if ($_['encryptionEnabled']) {
- print_unescaped('checked="checked" disabled="disabled"');
-} ?> />
- <label
- for="enableEncryption"><?php p($l->t('Enable server-side encryption')); ?> <span id="startmigration_msg" class="msg"></span> </label><br/>
- </p>
-
- <div id="EncryptionWarning" class="warning hidden">
- <p><?php p($l->t('Please read carefully before activating server-side encryption: ')); ?></p>
- <ul>
- <li><?php p($l->t('Once encryption is enabled, all files uploaded to the server from that point forward will be encrypted at rest on the server. It will only be possible to disable encryption at a later date if the active encryption module supports that function, and all pre-conditions (e.g. setting a recover key) are met.')); ?></li>
- <li><?php p($l->t('Encryption alone does not guarantee security of the system. Please see documentation for more information about how the encryption app works, and the supported use cases.')); ?></li>
- <li><?php p($l->t('Be aware that encryption always increases the file size.')); ?></li>
- <li><?php p($l->t('It is always good to create regular backups of your data, in case of encryption make sure to backup the encryption keys along with your data.')); ?></li>
- </ul>
-
- <p><?php p($l->t('This is the final warning: Do you really want to enable encryption?')) ?> <input type="button"
- id="reallyEnableEncryption"
- value="<?php p($l->t("Enable encryption")); ?>" /></p>
- </div>
-
- <div id="EncryptionSettingsArea" class="<?php if (!$_['encryptionEnabled']) {
- p('hidden');
-} ?>">
- <div id='selectEncryptionModules' class="<?php if (!$_['encryptionReady']) {
- p('hidden');
-} ?>">
- <?php
- if (empty($_['encryptionModules'])) {
- p($l->t('No encryption module loaded, please enable an encryption module in the app menu.'));
- } else { ?>
- <h3><?php p($l->t('Select default encryption module:')) ?></h3>
- <fieldset id='encryptionModules'>
- <?php foreach ($_['encryptionModules'] as $id => $module): ?>
- <input type="radio" id="<?php p($id) ?>" class="radio"
- name="default_encryption_module"
- value="<?php p($id) ?>"
- <?php if ($module['default']) {
- p('checked');
- } ?>>
- <label
- for="<?php p($id) ?>"><?php p($module['displayName']) ?></label>
- <br/>
- <?php endforeach; ?>
- </fieldset>
- <?php } ?>
- </div>
- <div id="migrationWarning" class="<?php if ($_['encryptionReady']) {
- p('hidden');
- } ?>">
- <?php
- if ($_['encryptionReady'] === false && $_['externalBackendsEnabled'] === true) {
- p($l->t('You need to migrate your encryption keys from the old encryption (ownCloud <= 8.0) to the new one. Please enable the "Default encryption module" and run \'occ encryption:migrate\''));
- } elseif ($_['encryptionReady'] === false && $_['externalBackendsEnabled'] === false) {
- p($l->t('You need to migrate your encryption keys from the old encryption (ownCloud <= 8.0) to the new one.')); ?>
- <input type="submit" name="startmigration" id="startmigration"
- value="<?php p($l->t('Start migration')); ?>"/>
- <?php
- } ?>
- </div>
- </div>
-</div>
+<div id="vue-admin-encryption"></div>
diff --git a/apps/settings/tests/Settings/Admin/SecurityTest.php b/apps/settings/tests/Settings/Admin/SecurityTest.php
index 8bb330469fb..52d113c04fe 100644
--- a/apps/settings/tests/Settings/Admin/SecurityTest.php
+++ b/apps/settings/tests/Settings/Admin/SecurityTest.php
@@ -99,12 +99,7 @@ class SecurityTest extends TestCase {
$expected = new TemplateResponse(
'settings',
'settings/admin/security',
- [
- 'encryptionEnabled' => $enabled,
- 'encryptionReady' => $enabled,
- 'externalBackendsEnabled' => false,
- 'encryptionModules' => []
- ],
+ [],
''
);
$this->assertEquals($expected, $this->admin->getForm());
@@ -134,12 +129,7 @@ class SecurityTest extends TestCase {
$expected = new TemplateResponse(
'settings',
'settings/admin/security',
- [
- 'encryptionEnabled' => $enabled,
- 'encryptionReady' => $enabled,
- 'externalBackendsEnabled' => true,
- 'encryptionModules' => []
- ],
+ [ ],
''
);
$this->assertEquals($expected, $this->admin->getForm());
diff --git a/apps/theming/css/default.css b/apps/theming/css/default.css
index e2d641f530e..262af7a3b83 100644
--- a/apps/theming/css/default.css
+++ b/apps/theming/css/default.css
@@ -25,10 +25,13 @@
--color-text-light: #222222;
--color-text-lighter: #767676;
--color-error: #e9322d;
+ --color-error-rgb: 233,50,45;
--color-error-hover: #ed5a56;
--color-warning: #eca700;
+ --color-warning-rgb: 236,167,0;
--color-warning-hover: #efb832;
--color-success: #46ba61;
+ --color-success-rgb: 70,186,97;
--color-success-hover: #6ac780;
--color-loading-light: #cccccc;
--color-loading-dark: #444444;
diff --git a/apps/theming/lib/Themes/DefaultTheme.php b/apps/theming/lib/Themes/DefaultTheme.php
index 58983d29df1..c822b3052ce 100644
--- a/apps/theming/lib/Themes/DefaultTheme.php
+++ b/apps/theming/lib/Themes/DefaultTheme.php
@@ -132,10 +132,13 @@ class DefaultTheme implements ITheme {
// info/warning/success feedback colours
'--color-error' => '#e9322d',
+ '--color-error-rgb' => join(',', $this->util->hexToRGB('#e9322d')),
'--color-error-hover' => $this->util->mix('#e9322d', $colorMainBackground, 60),
'--color-warning' => '#eca700',
+ '--color-warning-rgb' => join(',', $this->util->hexToRGB('#eca700')),
'--color-warning-hover' => $this->util->mix('#eca700', $colorMainBackground, 60),
'--color-success' => '#46ba61',
+ '--color-success-rgb' => join(',', $this->util->hexToRGB('#46ba61')),
'--color-success-hover' => $this->util->mix('#46ba61', $colorMainBackground, 60),
// used for the icon loading animation
diff --git a/dist/settings-legacy-admin.js b/dist/settings-legacy-admin.js
index ef5c9d53d65..daf656adfd0 100644
--- a/dist/settings-legacy-admin.js
+++ b/dist/settings-legacy-admin.js
@@ -1,2 +1,2 @@
-({39583:function(){var e=this;window.addEventListener("DOMContentLoaded",(function(){$("#excludedGroups,#linksExcludedGroups,#passwordsExcludedGroups").each((function(e,t){var s=this;OC.Settings.setupGroupsSelect($(t)),$(t).change((function(e){var t=e.val||[];t=JSON.stringify(t),OCP.AppConfig.setValue("core",$(s).attr("name"),t)}))})),$("#loglevel").change((function(){$.post(OC.generateUrl("/settings/admin/log/level"),{level:$(e).val()},(function(){OC.Log.reload()}))})),$("#shareAPIEnabled").change((function(){$("#shareAPI p:not(#enable)").toggleClass("hidden",!e.checked)})),$("#enableEncryption").change((function(){$("#encryptionAPI div#EncryptionWarning").toggleClass("hidden")})),$("#reallyEnableEncryption").click((function(){$("#encryptionAPI div#EncryptionWarning").toggleClass("hidden"),$("#encryptionAPI div#EncryptionSettingsArea").toggleClass("hidden"),OCP.AppConfig.setValue("core","encryption_enabled","yes"),$("#enableEncryption").attr("disabled","disabled")})),$("#startmigration").click((function(e){$(window).on("beforeunload.encryption",(function(e){return t("settings","Migration in progress. Please wait until the migration is finished")})),e.preventDefault(),$("#startmigration").prop("disabled",!0),OC.msg.startAction("#startmigration_msg",t("settings","Migration started …")),$.post(OC.generateUrl("/settings/admin/startmigration"),"",(function(e){OC.msg.finishedAction("#startmigration_msg",e),"success"===e.status?($("#encryptionAPI div#selectEncryptionModules").toggleClass("hidden"),$("#encryptionAPI div#migrationWarning").toggleClass("hidden")):$("#startmigration").prop("disabled",!1),$(window).off("beforeunload.encryption")}))})),$("#shareapiExpireAfterNDays").on("input",(function(){this.value=this.value.replace(/\D/g,"")})),$("#shareAPI input:not(.noJSAutoUpdate)").change((function(){var e=$(this).val();"checkbox"===$(this).attr("type")&&(e=this.checked?"yes":"no"),OCP.AppConfig.setValue("core",$(this).attr("name"),e)})),$("#shareapiDefaultExpireDate").change((function(){$("setDefaultExpireDate").toggleClass("hidden",!this.checked)})),$("#shareapiDefaultInternalExpireDate").change((function(){$("#setDefaultInternalExpireDate").toggleClass("hidden",!this.checked)})),$("#shareapiDefaultRemoteExpireDate").change((function(){$("#setDefaultRemoteExpireDate").toggleClass("hidden",!this.checked)})),$("#enforceLinkPassword").change((function(){$("#selectPasswordsExcludedGroups").toggleClass("hidden",!this.checked)})),$("#publicShareDisclaimer").change((function(){$("#publicShareDisclaimerText").toggleClass("hidden",!this.checked),this.checked||s("")})),$("#shareApiDefaultPermissionsSection input").change((function(e){var t=$("#shareApiDefaultPermissions"),s=$(e.target),n=t.val();return s.is(":checked")?n|=s.val():n&=~s.val(),n|=OC.PERMISSION_READ,t.val(n).change(),e.preventDefault(),!1}));var s=_.debounce((function(e){var s={success:function(){OC.msg.finishedSuccess("#publicShareDisclaimerStatus",t("settings","Saved"))},error:function(){OC.msg.finishedError("#publicShareDisclaimerStatus",t("settings","Not saved"))}};OC.msg.startSaving("#publicShareDisclaimerStatus"),_.isString(e)&&""!==e?OCP.AppConfig.setValue("core","shareapi_public_link_disclaimertext",e,s):($("#publicShareDisclaimerText").val(""),OCP.AppConfig.deleteKey("core","shareapi_public_link_disclaimertext",s))}),500);$("#publicShareDisclaimerText").on("change, keyup",(function(){s(this.value)})),$("#shareapi_allow_share_dialog_user_enumeration").on("change",(function(){$("#shareapi_restrict_user_enumeration_to_group_setting").toggleClass("hidden",!this.checked),$("#shareapi_restrict_user_enumeration_to_phone_setting").toggleClass("hidden",!this.checked),$("#shareapi_restrict_user_enumeration_combinewarning_setting").toggleClass("hidden",!this.checked)})),$("#allowLinks").change((function(){$("#publicLinkSettings").toggleClass("hidden",!this.checked),$("#setDefaultExpireDate").toggleClass("hidden",!(this.checked&&$("#shareapiDefaultExpireDate")[0].checked))})),$("#mail_smtpauth").change((function(){this.checked?$("#mail_credentials").removeClass("hidden"):$("#mail_credentials").addClass("hidden")})),$("#mail_smtpmode").change((function(){"smtp"!==$(this).val()?($("#setting_smtpauth").addClass("hidden"),$("#setting_smtphost").addClass("hidden"),$("#mail_smtpsecure_label").addClass("hidden"),$("#mail_smtpsecure").addClass("hidden"),$("#mail_credentials").addClass("hidden"),$("#mail_sendmailmode_label, #mail_sendmailmode").removeClass("hidden")):($("#setting_smtpauth").removeClass("hidden"),$("#setting_smtphost").removeClass("hidden"),$("#mail_smtpsecure_label").removeClass("hidden"),$("#mail_smtpsecure").removeClass("hidden"),$("#mail_smtpauth").is(":checked")&&$("#mail_credentials").removeClass("hidden"),$("#mail_sendmailmode_label, #mail_sendmailmode").addClass("hidden"))})),$("#mail_general_settings_form").change((function e(){OC.PasswordConfirmation.requiresPasswordConfirmation()?OC.PasswordConfirmation.requirePasswordConfirmation(e):(OC.msg.startSaving("#mail_settings_msg"),$.ajax({url:OC.generateUrl("/settings/admin/mailsettings"),type:"POST",data:$("#mail_general_settings_form").serialize(),success:function(){OC.msg.finishedSuccess("#mail_settings_msg",t("settings","Saved"))},error:function(e){OC.msg.finishedError("#mail_settings_msg",e.responseJSON)}}))})),$("#mail_credentials_settings_submit").click((function e(){OC.PasswordConfirmation.requiresPasswordConfirmation()?OC.PasswordConfirmation.requirePasswordConfirmation(e):(OC.msg.startSaving("#mail_settings_msg"),$.ajax({url:OC.generateUrl("/settings/admin/mailsettings/credentials"),type:"POST",data:$("#mail_credentials_settings").serialize(),success:function(){OC.msg.finishedSuccess("#mail_settings_msg",t("settings","Saved"))},error:function(e){OC.msg.finishedError("#mail_settings_msg",e.responseJSON)}}))})),$("#mail_smtppassword").click((function(){"text"===e.type&&"********"===e.value&&(e.type="password",e.value="")})),$("#sendtestemail").click((function(e){e.preventDefault(),OC.msg.startAction("#sendtestmail_msg",t("settings","Sending…")),$.ajax({url:OC.generateUrl("/settings/admin/mailtest"),type:"POST",success:function(){OC.msg.finishedSuccess("#sendtestmail_msg",t("settings","Email sent"))},error:function(e){OC.msg.finishedError("#sendtestmail_msg",e.responseJSON)}})})),$("#allowGroupSharing").change((function(){$("#allowGroupSharing").toggleClass("hidden",!e.checked)})),$("#shareapiExcludeGroups").change((function(){$("#selectExcludedGroups").toggleClass("hidden",!e.checked)})),null!==document.getElementById("security-warning")&&$.when(OC.SetupChecks.checkWebDAV(),OC.SetupChecks.checkWellKnownUrl("GET","/.well-known/webfinger",OC.theme.docPlaceholderUrl,!0===$("#postsetupchecks").data("check-wellknown"),[200,404],!0),OC.SetupChecks.checkWellKnownUrl("GET","/.well-known/nodeinfo",OC.theme.docPlaceholderUrl,!0===$("#postsetupchecks").data("check-wellknown"),[200,404],!0),OC.SetupChecks.checkWellKnownUrl("PROPFIND","/.well-known/caldav",OC.theme.docPlaceholderUrl,!0===$("#postsetupchecks").data("check-wellknown")),OC.SetupChecks.checkWellKnownUrl("PROPFIND","/.well-known/carddav",OC.theme.docPlaceholderUrl,!0===$("#postsetupchecks").data("check-wellknown")),OC.SetupChecks.checkProviderUrl(OC.getRootPath()+"/ocm-provider/",OC.theme.docPlaceholderUrl,!0===$("#postsetupchecks").data("check-wellknown")),OC.SetupChecks.checkProviderUrl(OC.getRootPath()+"/ocs-provider/",OC.theme.docPlaceholderUrl,!0===$("#postsetupchecks").data("check-wellknown")),OC.SetupChecks.checkSetup(),OC.SetupChecks.checkGeneric(),OC.SetupChecks.checkWOFF2Loading(OC.filePath("core","","fonts/NotoSans-Regular-latin.woff2"),OC.theme.docPlaceholderUrl),OC.SetupChecks.checkDataProtected()).then((function(e,t,s,n,i,a,l,r,c,o,d){var h=[].concat(e,t,s,n,i,a,l,r,c,o,d),g=$("#postsetupchecks");$("#security-warning-state-loading").addClass("hidden");for(var u=!1,m=g.find(".errors"),p=g.find(".warnings"),C=g.find(".info"),f=0;f<h.length;f++)switch(h[f].type){case OC.SetupChecks.MESSAGE_TYPE_INFO:C.append("<li>"+h[f].msg+"</li>");break;case OC.SetupChecks.MESSAGE_TYPE_WARNING:p.append("<li>"+h[f].msg+"</li>");break;case OC.SetupChecks.MESSAGE_TYPE_ERROR:default:m.append("<li>"+h[f].msg+"</li>")}m.find("li").length>0&&(m.removeClass("hidden"),u=!0),p.find("li").length>0&&(p.removeClass("hidden"),u=!0),C.find("li").length>0&&(C.removeClass("hidden"),u=!0),u?($("#postsetupchecks-hint").removeClass("hidden"),m.find("li").length>0?$("#security-warning-state-failure").removeClass("hidden"):$("#security-warning-state-warning").removeClass("hidden")):0===$("#security-warning").children("ul").children().length?$("#security-warning-state-ok").removeClass("hidden"):$("#security-warning-state-failure").removeClass("hidden")}))}))}})[39583]();
-//# sourceMappingURL=settings-legacy-admin.js.map?v=7f59cc216fc20b44a8be \ No newline at end of file
+({39583:function(){var e=this;window.addEventListener("DOMContentLoaded",(function(){$("#excludedGroups,#linksExcludedGroups,#passwordsExcludedGroups").each((function(e,s){var t=this;OC.Settings.setupGroupsSelect($(s)),$(s).change((function(e){var s=e.val||[];s=JSON.stringify(s),OCP.AppConfig.setValue("core",$(t).attr("name"),s)}))})),$("#loglevel").change((function(){$.post(OC.generateUrl("/settings/admin/log/level"),{level:$(e).val()},(function(){OC.Log.reload()}))})),$("#shareAPIEnabled").change((function(){$("#shareAPI p:not(#enable)").toggleClass("hidden",!e.checked)})),$("#shareapiExpireAfterNDays").on("input",(function(){this.value=this.value.replace(/\D/g,"")})),$("#shareAPI input:not(.noJSAutoUpdate)").change((function(){var e=$(this).val();"checkbox"===$(this).attr("type")&&(e=this.checked?"yes":"no"),OCP.AppConfig.setValue("core",$(this).attr("name"),e)})),$("#shareapiDefaultExpireDate").change((function(){$("setDefaultExpireDate").toggleClass("hidden",!this.checked)})),$("#shareapiDefaultInternalExpireDate").change((function(){$("#setDefaultInternalExpireDate").toggleClass("hidden",!this.checked)})),$("#shareapiDefaultRemoteExpireDate").change((function(){$("#setDefaultRemoteExpireDate").toggleClass("hidden",!this.checked)})),$("#enforceLinkPassword").change((function(){$("#selectPasswordsExcludedGroups").toggleClass("hidden",!this.checked)})),$("#publicShareDisclaimer").change((function(){$("#publicShareDisclaimerText").toggleClass("hidden",!this.checked),this.checked||s("")})),$("#shareApiDefaultPermissionsSection input").change((function(e){var s=$("#shareApiDefaultPermissions"),t=$(e.target),i=s.val();return t.is(":checked")?i|=t.val():i&=~t.val(),i|=OC.PERMISSION_READ,s.val(i).change(),e.preventDefault(),!1}));var s=_.debounce((function(e){var s={success:function(){OC.msg.finishedSuccess("#publicShareDisclaimerStatus",t("settings","Saved"))},error:function(){OC.msg.finishedError("#publicShareDisclaimerStatus",t("settings","Not saved"))}};OC.msg.startSaving("#publicShareDisclaimerStatus"),_.isString(e)&&""!==e?OCP.AppConfig.setValue("core","shareapi_public_link_disclaimertext",e,s):($("#publicShareDisclaimerText").val(""),OCP.AppConfig.deleteKey("core","shareapi_public_link_disclaimertext",s))}),500);$("#publicShareDisclaimerText").on("change, keyup",(function(){s(this.value)})),$("#shareapi_allow_share_dialog_user_enumeration").on("change",(function(){$("#shareapi_restrict_user_enumeration_to_group_setting").toggleClass("hidden",!this.checked),$("#shareapi_restrict_user_enumeration_to_phone_setting").toggleClass("hidden",!this.checked),$("#shareapi_restrict_user_enumeration_combinewarning_setting").toggleClass("hidden",!this.checked)})),$("#allowLinks").change((function(){$("#publicLinkSettings").toggleClass("hidden",!this.checked),$("#setDefaultExpireDate").toggleClass("hidden",!(this.checked&&$("#shareapiDefaultExpireDate")[0].checked))})),$("#mail_smtpauth").change((function(){this.checked?$("#mail_credentials").removeClass("hidden"):$("#mail_credentials").addClass("hidden")})),$("#mail_smtpmode").change((function(){"smtp"!==$(this).val()?($("#setting_smtpauth").addClass("hidden"),$("#setting_smtphost").addClass("hidden"),$("#mail_smtpsecure_label").addClass("hidden"),$("#mail_smtpsecure").addClass("hidden"),$("#mail_credentials").addClass("hidden"),$("#mail_sendmailmode_label, #mail_sendmailmode").removeClass("hidden")):($("#setting_smtpauth").removeClass("hidden"),$("#setting_smtphost").removeClass("hidden"),$("#mail_smtpsecure_label").removeClass("hidden"),$("#mail_smtpsecure").removeClass("hidden"),$("#mail_smtpauth").is(":checked")&&$("#mail_credentials").removeClass("hidden"),$("#mail_sendmailmode_label, #mail_sendmailmode").addClass("hidden"))})),$("#mail_general_settings_form").change((function e(){OC.PasswordConfirmation.requiresPasswordConfirmation()?OC.PasswordConfirmation.requirePasswordConfirmation(e):(OC.msg.startSaving("#mail_settings_msg"),$.ajax({url:OC.generateUrl("/settings/admin/mailsettings"),type:"POST",data:$("#mail_general_settings_form").serialize(),success:function(){OC.msg.finishedSuccess("#mail_settings_msg",t("settings","Saved"))},error:function(e){OC.msg.finishedError("#mail_settings_msg",e.responseJSON)}}))})),$("#mail_credentials_settings_submit").click((function e(){OC.PasswordConfirmation.requiresPasswordConfirmation()?OC.PasswordConfirmation.requirePasswordConfirmation(e):(OC.msg.startSaving("#mail_settings_msg"),$.ajax({url:OC.generateUrl("/settings/admin/mailsettings/credentials"),type:"POST",data:$("#mail_credentials_settings").serialize(),success:function(){OC.msg.finishedSuccess("#mail_settings_msg",t("settings","Saved"))},error:function(e){OC.msg.finishedError("#mail_settings_msg",e.responseJSON)}}))})),$("#mail_smtppassword").click((function(){"text"===e.type&&"********"===e.value&&(e.type="password",e.value="")})),$("#sendtestemail").click((function(e){e.preventDefault(),OC.msg.startAction("#sendtestmail_msg",t("settings","Sending…")),$.ajax({url:OC.generateUrl("/settings/admin/mailtest"),type:"POST",success:function(){OC.msg.finishedSuccess("#sendtestmail_msg",t("settings","Email sent"))},error:function(e){OC.msg.finishedError("#sendtestmail_msg",e.responseJSON)}})})),$("#allowGroupSharing").change((function(){$("#allowGroupSharing").toggleClass("hidden",!e.checked)})),$("#shareapiExcludeGroups").change((function(){$("#selectExcludedGroups").toggleClass("hidden",!e.checked)})),null!==document.getElementById("security-warning")&&$.when(OC.SetupChecks.checkWebDAV(),OC.SetupChecks.checkWellKnownUrl("GET","/.well-known/webfinger",OC.theme.docPlaceholderUrl,!0===$("#postsetupchecks").data("check-wellknown"),[200,404],!0),OC.SetupChecks.checkWellKnownUrl("GET","/.well-known/nodeinfo",OC.theme.docPlaceholderUrl,!0===$("#postsetupchecks").data("check-wellknown"),[200,404],!0),OC.SetupChecks.checkWellKnownUrl("PROPFIND","/.well-known/caldav",OC.theme.docPlaceholderUrl,!0===$("#postsetupchecks").data("check-wellknown")),OC.SetupChecks.checkWellKnownUrl("PROPFIND","/.well-known/carddav",OC.theme.docPlaceholderUrl,!0===$("#postsetupchecks").data("check-wellknown")),OC.SetupChecks.checkProviderUrl(OC.getRootPath()+"/ocm-provider/",OC.theme.docPlaceholderUrl,!0===$("#postsetupchecks").data("check-wellknown")),OC.SetupChecks.checkProviderUrl(OC.getRootPath()+"/ocs-provider/",OC.theme.docPlaceholderUrl,!0===$("#postsetupchecks").data("check-wellknown")),OC.SetupChecks.checkSetup(),OC.SetupChecks.checkGeneric(),OC.SetupChecks.checkWOFF2Loading(OC.filePath("core","","fonts/NotoSans-Regular-latin.woff2"),OC.theme.docPlaceholderUrl),OC.SetupChecks.checkDataProtected()).then((function(e,s,t,i,n,a,l,c,r,o,d){var h=[].concat(e,s,t,i,n,a,l,c,r,o,d),u=$("#postsetupchecks");$("#security-warning-state-loading").addClass("hidden");for(var g=!1,m=u.find(".errors"),p=u.find(".warnings"),C=u.find(".info"),f=0;f<h.length;f++)switch(h[f].type){case OC.SetupChecks.MESSAGE_TYPE_INFO:C.append("<li>"+h[f].msg+"</li>");break;case OC.SetupChecks.MESSAGE_TYPE_WARNING:p.append("<li>"+h[f].msg+"</li>");break;case OC.SetupChecks.MESSAGE_TYPE_ERROR:default:m.append("<li>"+h[f].msg+"</li>")}m.find("li").length>0&&(m.removeClass("hidden"),g=!0),p.find("li").length>0&&(p.removeClass("hidden"),g=!0),C.find("li").length>0&&(C.removeClass("hidden"),g=!0),g?($("#postsetupchecks-hint").removeClass("hidden"),m.find("li").length>0?$("#security-warning-state-failure").removeClass("hidden"):$("#security-warning-state-warning").removeClass("hidden")):0===$("#security-warning").children("ul").children().length?$("#security-warning-state-ok").removeClass("hidden"):$("#security-warning-state-failure").removeClass("hidden")}))}))}})[39583]();
+//# sourceMappingURL=settings-legacy-admin.js.map?v=dc7b58858b03f8b7638c \ No newline at end of file
diff --git a/dist/settings-legacy-admin.js.map b/dist/settings-legacy-admin.js.map
index 77ce3b072e3..c0c6116a059 100644
--- a/dist/settings-legacy-admin.js.map
+++ b/dist/settings-legacy-admin.js.map
@@ -1 +1 @@
-{"version":3,"file":"settings-legacy-admin.js?v=7f59cc216fc20b44a8be","mappings":"8BAAAA,OAAOC,iBAAiB,oBAAoB,WAC3CC,EAAE,iEAAiEC,MAAK,SAASC,EAAOC,GAAS,WAChGC,GAAGC,SAASC,kBAAkBN,EAAEG,IAChCH,EAAEG,GAASI,QAAO,SAACC,GAClB,IAAIC,EAASD,EAAGE,KAAO,GACvBD,EAASE,KAAKC,UAAUH,GACxBI,IAAIC,UAAUC,SAAS,OAAQf,EAAE,GAAMgB,KAAK,QAASP,SAIvDT,EAAE,aAAaO,QAAO,WACrBP,EAAEiB,KAAKb,GAAGc,YAAY,6BAA8B,CAAEC,MAAOnB,EAAE,GAAMU,QAAS,WAC7EN,GA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S,IACjCL,EAAU3C,YAAY,UACtB0C,GAAc,GAEXG,EAAYD,KAAK,MAAMI,OAAS,IACnCH,EAAY7C,YAAY,UACxB0C,GAAc,GAEXI,EAAQF,KAAK,MAAMI,OAAS,IAC/BF,EAAQ9C,YAAY,UACpB0C,GAAc,GAGXA,GACHlG,EAAE,yBAAyBwD,YAAY,UACnC2C,EAAUC,KAAK,MAAMI,OAAS,EACjCxG,EAAE,mCAAmCwD,YAAY,UAEjDxD,EAAE,mCAAmCwD,YAAY,WAIO,IADjCxD,EAAE,qBACN6G,SAAS,MAAMA,WAAWL,OAC7CxG,EAAE,8BAA8BwD,YAAY,UAE5CxD,EAAE,mCAAmCwD,YAAY,mBClTlC","sources":["webpack:///nextcloud/apps/settings/src/admin.js","webpack:///nextcloud/webpack/startup"],"sourcesContent":["window.addEventListener('DOMContentLoaded', () => {\n\t$('#excludedGroups,#linksExcludedGroups,#passwordsExcludedGroups').each(function(index, element) {\n\t\tOC.Settings.setupGroupsSelect($(element))\n\t\t$(element).change((ev) => {\n\t\t\tlet groups = ev.val || []\n\t\t\tgroups = JSON.stringify(groups)\n\t\t\tOCP.AppConfig.setValue('core', $(this).attr('name'), groups)\n\t\t})\n\t})\n\n\t$('#loglevel').change(() => {\n\t\t$.post(OC.generateUrl('/settings/admin/log/level'), { level: $(this).val() }, () => {\n\t\t\tOC.Log.reload()\n\t\t})\n\t})\n\n\t$('#shareAPIEnabled').change(() => {\n\t\t$('#shareAPI p:not(#enable)').toggleClass('hidden', !this.checked)\n\t})\n\n\t$('#enableEncryption').change(() => {\n\t\t$('#encryptionAPI div#EncryptionWarning').toggleClass('hidden')\n\t})\n\n\t$('#reallyEnableEncryption').click(() => {\n\t\t$('#encryptionAPI div#EncryptionWarning').toggleClass('hidden')\n\t\t$('#encryptionAPI div#EncryptionSettingsArea').toggleClass('hidden')\n\t\tOCP.AppConfig.setValue('core', 'encryption_enabled', 'yes')\n\t\t$('#enableEncryption').attr('disabled', 'disabled')\n\t})\n\n\t$('#startmigration').click((event) => {\n\t\t$(window).on('beforeunload.encryption', (e) => {\n\t\t\treturn t('settings', 'Migration in progress. Please wait until the migration is finished')\n\t\t})\n\t\tevent.preventDefault()\n\t\t$('#startmigration').prop('disabled', true)\n\t\tOC.msg.startAction('#startmigration_msg', t('settings', 'Migration started …'))\n\t\t$.post(OC.generateUrl('/settings/admin/startmigration'), '', function(data) {\n\t\t\tOC.msg.finishedAction('#startmigration_msg', data)\n\t\t\tif (data.status === 'success') {\n\t\t\t\t$('#encryptionAPI div#selectEncryptionModules').toggleClass('hidden')\n\t\t\t\t$('#encryptionAPI div#migrationWarning').toggleClass('hidden')\n\t\t\t} else {\n\t\t\t\t$('#startmigration').prop('disabled', false)\n\t\t\t}\n\t\t\t$(window).off('beforeunload.encryption')\n\n\t\t})\n\t})\n\n\t$('#shareapiExpireAfterNDays').on('input', function() {\n\t\tthis.value = this.value.replace(/\\D/g, '')\n\t})\n\n\t$('#shareAPI input:not(.noJSAutoUpdate)').change(function() {\n\t\tlet value = $(this).val()\n\t\tif ($(this).attr('type') === 'checkbox') {\n\t\t\tif (this.checked) {\n\t\t\t\tvalue = 'yes'\n\t\t\t} else {\n\t\t\t\tvalue = 'no'\n\t\t\t}\n\t\t}\n\t\tOCP.AppConfig.setValue('core', $(this).attr('name'), value)\n\t})\n\n\t$('#shareapiDefaultExpireDate').change(function() {\n\t\t$('setDefaultExpireDate').toggleClass('hidden', !this.checked)\n\t})\n\n\t$('#shareapiDefaultInternalExpireDate').change(function() {\n\t\t$('#setDefaultInternalExpireDate').toggleClass('hidden', !this.checked)\n\t})\n\n\t$('#shareapiDefaultRemoteExpireDate').change(function() {\n\t\t$('#setDefaultRemoteExpireDate').toggleClass('hidden', !this.checked)\n\t})\n\n\t$('#enforceLinkPassword').change(function() {\n\t\t$('#selectPasswordsExcludedGroups').toggleClass('hidden', !this.checked)\n\t})\n\n\t$('#publicShareDisclaimer').change(function() {\n\t\t$('#publicShareDisclaimerText').toggleClass('hidden', !this.checked)\n\t\tif (!this.checked) {\n\t\t\tsavePublicShareDisclaimerText('')\n\t\t}\n\t})\n\n\t$('#shareApiDefaultPermissionsSection input').change(function(ev) {\n\t\tconst $el = $('#shareApiDefaultPermissions')\n\t\tconst $target = $(ev.target)\n\n\t\tlet value = $el.val()\n\t\tif ($target.is(':checked')) {\n\t\t\tvalue = value | $target.val()\n\t\t} else {\n\t\t\tvalue = value & ~$target.val()\n\t\t}\n\n\t\t// always set read permission\n\t\tvalue |= OC.PERMISSION_READ\n\n\t\t// this will trigger the field's change event and will save it\n\t\t$el.val(value).change()\n\n\t\tev.preventDefault()\n\n\t\treturn false\n\t})\n\n\tconst savePublicShareDisclaimerText = _.debounce(function(value) {\n\t\tconst options = {\n\t\t\tsuccess: () => {\n\t\t\t\tOC.msg.finishedSuccess('#publicShareDisclaimerStatus', t('settings', 'Saved'))\n\t\t\t},\n\t\t\terror: () => {\n\t\t\t\tOC.msg.finishedError('#publicShareDisclaimerStatus', t('settings', 'Not saved'))\n\t\t\t},\n\t\t}\n\n\t\tOC.msg.startSaving('#publicShareDisclaimerStatus')\n\t\tif (_.isString(value) && value !== '') {\n\t\t\tOCP.AppConfig.setValue('core', 'shareapi_public_link_disclaimertext', value, options)\n\t\t} else {\n\t\t\t$('#publicShareDisclaimerText').val('')\n\t\t\tOCP.AppConfig.deleteKey('core', 'shareapi_public_link_disclaimertext', options)\n\t\t}\n\t}, 500)\n\n\t$('#publicShareDisclaimerText').on('change, keyup', function() {\n\t\tsavePublicShareDisclaimerText(this.value)\n\t})\n\n\t$('#shareapi_allow_share_dialog_user_enumeration').on('change', function() {\n\t\t$('#shareapi_restrict_user_enumeration_to_group_setting').toggleClass('hidden', !this.checked)\n\t\t$('#shareapi_restrict_user_enumeration_to_phone_setting').toggleClass('hidden', !this.checked)\n\t\t$('#shareapi_restrict_user_enumeration_combinewarning_setting').toggleClass('hidden', !this.checked)\n\t})\n\n\t$('#allowLinks').change(function() {\n\t\t$('#publicLinkSettings').toggleClass('hidden', !this.checked)\n\t\t$('#setDefaultExpireDate').toggleClass('hidden', !(this.checked && $('#shareapiDefaultExpireDate')[0].checked))\n\t})\n\n\t$('#mail_smtpauth').change(function() {\n\t\tif (!this.checked) {\n\t\t\t$('#mail_credentials').addClass('hidden')\n\t\t} else {\n\t\t\t$('#mail_credentials').removeClass('hidden')\n\t\t}\n\t})\n\n\t$('#mail_smtpmode').change(function() {\n\t\tif ($(this).val() !== 'smtp') {\n\t\t\t$('#setting_smtpauth').addClass('hidden')\n\t\t\t$('#setting_smtphost').addClass('hidden')\n\t\t\t$('#mail_smtpsecure_label').addClass('hidden')\n\t\t\t$('#mail_smtpsecure').addClass('hidden')\n\t\t\t$('#mail_credentials').addClass('hidden')\n\t\t\t$('#mail_sendmailmode_label, #mail_sendmailmode').removeClass('hidden')\n\t\t} else {\n\t\t\t$('#setting_smtpauth').removeClass('hidden')\n\t\t\t$('#setting_smtphost').removeClass('hidden')\n\t\t\t$('#mail_smtpsecure_label').removeClass('hidden')\n\t\t\t$('#mail_smtpsecure').removeClass('hidden')\n\t\t\tif ($('#mail_smtpauth').is(':checked')) {\n\t\t\t\t$('#mail_credentials').removeClass('hidden')\n\t\t\t}\n\t\t\t$('#mail_sendmailmode_label, #mail_sendmailmode').addClass('hidden')\n\t\t}\n\t})\n\n\tconst changeEmailSettings = function() {\n\t\tif (OC.PasswordConfirmation.requiresPasswordConfirmation()) {\n\t\t\tOC.PasswordConfirmation.requirePasswordConfirmation(changeEmailSettings)\n\t\t\treturn\n\t\t}\n\n\t\tOC.msg.startSaving('#mail_settings_msg')\n\t\t$.ajax({\n\t\t\turl: OC.generateUrl('/settings/admin/mailsettings'),\n\t\t\ttype: 'POST',\n\t\t\tdata: $('#mail_general_settings_form').serialize(),\n\t\t\tsuccess: () => {\n\t\t\t\tOC.msg.finishedSuccess('#mail_settings_msg', t('settings', 'Saved'))\n\t\t\t},\n\t\t\terror: (xhr) => {\n\t\t\t\tOC.msg.finishedError('#mail_settings_msg', xhr.responseJSON)\n\t\t\t},\n\t\t})\n\t}\n\n\tconst toggleEmailCredentials = function() {\n\t\tif (OC.PasswordConfirmation.requiresPasswordConfirmation()) {\n\t\t\tOC.PasswordConfirmation.requirePasswordConfirmation(toggleEmailCredentials)\n\t\t\treturn\n\t\t}\n\n\t\tOC.msg.startSaving('#mail_settings_msg')\n\t\t$.ajax({\n\t\t\turl: OC.generateUrl('/settings/admin/mailsettings/credentials'),\n\t\t\ttype: 'POST',\n\t\t\tdata: $('#mail_credentials_settings').serialize(),\n\t\t\tsuccess: () => {\n\t\t\t\tOC.msg.finishedSuccess('#mail_settings_msg', t('settings', 'Saved'))\n\t\t\t},\n\t\t\terror: (xhr) => {\n\t\t\t\tOC.msg.finishedError('#mail_settings_msg', xhr.responseJSON)\n\t\t\t},\n\t\t})\n\t}\n\n\t$('#mail_general_settings_form').change(changeEmailSettings)\n\t$('#mail_credentials_settings_submit').click(toggleEmailCredentials)\n\t$('#mail_smtppassword').click(() => {\n\t\tif (this.type === 'text' && this.value === '********') {\n\t\t\tthis.type = 'password'\n\t\t\tthis.value = ''\n\t\t}\n\t})\n\n\t$('#sendtestemail').click((event) => {\n\t\tevent.preventDefault()\n\t\tOC.msg.startAction('#sendtestmail_msg', t('settings', 'Sending…'))\n\n\t\t$.ajax({\n\t\t\turl: OC.generateUrl('/settings/admin/mailtest'),\n\t\t\ttype: 'POST',\n\t\t\tsuccess: () => {\n\t\t\t\tOC.msg.finishedSuccess('#sendtestmail_msg', t('settings', 'Email sent'))\n\t\t\t},\n\t\t\terror: (xhr) => {\n\t\t\t\tOC.msg.finishedError('#sendtestmail_msg', xhr.responseJSON)\n\t\t\t},\n\t\t})\n\t})\n\n\t$('#allowGroupSharing').change(() => {\n\t\t$('#allowGroupSharing').toggleClass('hidden', !this.checked)\n\t})\n\n\t$('#shareapiExcludeGroups').change(() => {\n\t\t$('#selectExcludedGroups').toggleClass('hidden', !this.checked)\n\t})\n\n\tconst setupChecks = () => {\n\t\t// run setup checks then gather error messages\n\t\t$.when(\n\t\t\tOC.SetupChecks.checkWebDAV(),\n\t\t\tOC.SetupChecks.checkWellKnownUrl('GET', '/.well-known/webfinger', OC.theme.docPlaceholderUrl, $('#postsetupchecks').data('check-wellknown') === true, [200, 404], true),\n\t\t\tOC.SetupChecks.checkWellKnownUrl('GET', '/.well-known/nodeinfo', OC.theme.docPlaceholderUrl, $('#postsetupchecks').data('check-wellknown') === true, [200, 404], true),\n\t\t\tOC.SetupChecks.checkWellKnownUrl('PROPFIND', '/.well-known/caldav', OC.theme.docPlaceholderUrl, $('#postsetupchecks').data('check-wellknown') === true),\n\t\t\tOC.SetupChecks.checkWellKnownUrl('PROPFIND', '/.well-known/carddav', OC.theme.docPlaceholderUrl, $('#postsetupchecks').data('check-wellknown') === true),\n\t\t\tOC.SetupChecks.checkProviderUrl(OC.getRootPath() + '/ocm-provider/', OC.theme.docPlaceholderUrl, $('#postsetupchecks').data('check-wellknown') === true),\n\t\t\tOC.SetupChecks.checkProviderUrl(OC.getRootPath() + '/ocs-provider/', OC.theme.docPlaceholderUrl, $('#postsetupchecks').data('check-wellknown') === true),\n\t\t\tOC.SetupChecks.checkSetup(),\n\t\t\tOC.SetupChecks.checkGeneric(),\n\t\t\tOC.SetupChecks.checkWOFF2Loading(OC.filePath('core', '', 'fonts/NotoSans-Regular-latin.woff2'), OC.theme.docPlaceholderUrl),\n\t\t\tOC.SetupChecks.checkDataProtected()\n\t\t).then((check1, check2, check3, check4, check5, check6, check7, check8, check9, check10, check11) => {\n\t\t\tconst messages = [].concat(check1, check2, check3, check4, check5, check6, check7, check8, check9, check10, check11)\n\t\t\tconst $el = $('#postsetupchecks')\n\t\t\t$('#security-warning-state-loading').addClass('hidden')\n\n\t\t\tlet hasMessages = false\n\t\t\tconst $errorsEl = $el.find('.errors')\n\t\t\tconst $warningsEl = $el.find('.warnings')\n\t\t\tconst $infoEl = $el.find('.info')\n\n\t\t\tfor (let i = 0; i < messages.length; i++) {\n\t\t\t\tswitch (messages[i].type) {\n\t\t\t\tcase OC.SetupChecks.MESSAGE_TYPE_INFO:\n\t\t\t\t\t$infoEl.append('<li>' + messages[i].msg + '</li>')\n\t\t\t\t\tbreak\n\t\t\t\tcase OC.SetupChecks.MESSAGE_TYPE_WARNING:\n\t\t\t\t\t$warningsEl.append('<li>' + messages[i].msg + '</li>')\n\t\t\t\t\tbreak\n\t\t\t\tcase OC.SetupChecks.MESSAGE_TYPE_ERROR:\n\t\t\t\tdefault:\n\t\t\t\t\t$errorsEl.append('<li>' + messages[i].msg + '</li>')\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($errorsEl.find('li').length > 0) {\n\t\t\t\t$errorsEl.removeClass('hidden')\n\t\t\t\thasMessages = true\n\t\t\t}\n\t\t\tif ($warningsEl.find('li').length > 0) {\n\t\t\t\t$warningsEl.removeClass('hidden')\n\t\t\t\thasMessages = true\n\t\t\t}\n\t\t\tif ($infoEl.find('li').length > 0) {\n\t\t\t\t$infoEl.removeClass('hidden')\n\t\t\t\thasMessages = true\n\t\t\t}\n\n\t\t\tif (hasMessages) {\n\t\t\t\t$('#postsetupchecks-hint').removeClass('hidden')\n\t\t\t\tif ($errorsEl.find('li').length > 0) {\n\t\t\t\t\t$('#security-warning-state-failure').removeClass('hidden')\n\t\t\t\t} else {\n\t\t\t\t\t$('#security-warning-state-warning').removeClass('hidden')\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst securityWarning = $('#security-warning')\n\t\t\t\tif (securityWarning.children('ul').children().length === 0) {\n\t\t\t\t\t$('#security-warning-state-ok').removeClass('hidden')\n\t\t\t\t} else {\n\t\t\t\t\t$('#security-warning-state-failure').removeClass('hidden')\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t}\n\n\tif (document.getElementById('security-warning') !== null) {\n\t\tsetupChecks()\n\t}\n})\n","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = {};\n__webpack_modules__[39583]();\n"],"names":["window","addEventListener","$","each","index","element","OC","Settings","setupGroupsSelect","change","ev","groups","val","JSON","stringify","OCP","AppConfig","setValue","attr","post","generateUrl","level","Log","reload","toggleClass","checked","click","event","on","e","t","preventDefault","prop","msg","startAction","data","finishedAction","status","off","this","value","replace","savePublicShareDisclaimerText","$el","$target","target","is","PERMISSION_READ","_","debounce","options","success","finishedSuccess","error","finishedError","startSaving","isString","deleteKey","removeClass","addClass","changeEmailSettings","PasswordConfirmation","requiresPasswordConfirmation","requirePasswordConfirmation","ajax","url","type","serialize","xhr","responseJSON","toggleEmailCredentials","document","getElementById","when","SetupChecks","checkWebDAV","checkWellKnownUrl","theme","docPlaceholderUrl","checkProviderUrl","getRootPath","checkSetup","checkGeneric","checkWOFF2Loading","filePath","checkDataProtected","then","check1","check2","check3","check4","check5","check6","check7","check8","check9","check10","check11","messages","concat","hasMessages","$errorsEl","find","$warningsEl","$infoEl","i","length","MESSAGE_TYPE_INFO","append","MESSAGE_TYPE_WARNING","MESSAGE_TYPE_ERROR","children"],"sourceRoot":""} \ No newline at end of file
+{"version":3,"file":"settings-legacy-admin.js?v=dc7b58858b03f8b7638c","mappings":"8BAAAA,OAAOC,iBAAiB,oBAAoB,WAC3CC,EAAE,iEAAiEC,MAAK,SAASC,EAAOC,GAAS,WAChGC,GAAGC,SAASC,kBAAkBN,EAAEG,IAChCH,EAAEG,GAASI,QAAO,SAACC,GAClB,IAAIC,EAASD,EAAGE,KAAO,GACvBD,EAASE,KAAKC,UAAUH,GACxBI,IAAIC,UAAUC,SAAS,OAAQf,EAAE,GAAMgB,KAAK,QAASP,SAIvDT,EAAE,aAAaO,QAAO,WACrBP,EAAEiB,KAAKb,GAAGc,YAAY,6BAA8B,CAAEC,MAAOnB,EAAE,GAAMU,QAAS,WAC7EN,GAAGgB,IAAIC,eAITrB,EAAE,oBAAoBO,QAAO,WAC5BP,EAAE,4BAA4BsB,YAAY,UAAW,EAAKC,YAG3DvB,EAAE,6BAA6BwB,GAAG,SAAS,WAC1CC,KAAKC,M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AI,EAAGA,EAAIP,EAASQ,OAAQD,IACpC,OAAQP,EAASO,GAAG3C,MACpB,KAAKnD,GAAG+D,YAAYiC,kBACnBH,EAAQI,OAAO,OAASV,EAASO,GAAG3D,IAAM,SAC1C,MACD,KAAKnC,GAAG+D,YAAYmC,qBACnBN,EAAYK,OAAO,OAASV,EAASO,GAAG3D,IAAM,SAC9C,MACD,KAAKnC,GAAG+D,YAAYoC,mBACpB,QACCT,EAAUO,OAAO,OAASV,EAASO,GAAG3D,IAAM,SAI1CuD,EAAUC,KAAK,MAAMI,OAAS,IACjCL,EAAU/C,YAAY,UACtB8C,GAAc,GAEXG,EAAYD,KAAK,MAAMI,OAAS,IACnCH,EAAYjD,YAAY,UACxB8C,GAAc,GAEXI,EAAQF,KAAK,MAAMI,OAAS,IAC/BF,EAAQlD,YAAY,UACpB8C,GAAc,GAGXA,GACH7F,EAAE,yBAAyB+C,YAAY,UACnC+C,EAAUC,KAAK,MAAMI,OAAS,EACjCnG,EAAE,mCAAmC+C,YAAY,UAEjD/C,EAAE,mCAAmC+C,YAAY,WAIO,IADjC/C,EAAE,qBACNwG,SAAS,MAAMA,WAAWL,OAC7CnG,EAAE,8BAA8B+C,YAAY,UAE5C/C,EAAE,mCAAmC+C,YAAY,mBCnRlC","sources":["webpack:///nextcloud/apps/settings/src/admin.js","webpack:///nextcloud/webpack/startup"],"sourcesContent":["window.addEventListener('DOMContentLoaded', () => {\n\t$('#excludedGroups,#linksExcludedGroups,#passwordsExcludedGroups').each(function(index, element) {\n\t\tOC.Settings.setupGroupsSelect($(element))\n\t\t$(element).change((ev) => {\n\t\t\tlet groups = ev.val || []\n\t\t\tgroups = JSON.stringify(groups)\n\t\t\tOCP.AppConfig.setValue('core', $(this).attr('name'), groups)\n\t\t})\n\t})\n\n\t$('#loglevel').change(() => {\n\t\t$.post(OC.generateUrl('/settings/admin/log/level'), { level: $(this).val() }, () => {\n\t\t\tOC.Log.reload()\n\t\t})\n\t})\n\n\t$('#shareAPIEnabled').change(() => {\n\t\t$('#shareAPI p:not(#enable)').toggleClass('hidden', !this.checked)\n\t})\n\n\t$('#shareapiExpireAfterNDays').on('input', function() {\n\t\tthis.value = this.value.replace(/\\D/g, '')\n\t})\n\n\t$('#shareAPI input:not(.noJSAutoUpdate)').change(function() {\n\t\tlet value = $(this).val()\n\t\tif ($(this).attr('type') === 'checkbox') {\n\t\t\tif (this.checked) {\n\t\t\t\tvalue = 'yes'\n\t\t\t} else {\n\t\t\t\tvalue = 'no'\n\t\t\t}\n\t\t}\n\t\tOCP.AppConfig.setValue('core', $(this).attr('name'), value)\n\t})\n\n\t$('#shareapiDefaultExpireDate').change(function() {\n\t\t$('setDefaultExpireDate').toggleClass('hidden', !this.checked)\n\t})\n\n\t$('#shareapiDefaultInternalExpireDate').change(function() {\n\t\t$('#setDefaultInternalExpireDate').toggleClass('hidden', !this.checked)\n\t})\n\n\t$('#shareapiDefaultRemoteExpireDate').change(function() {\n\t\t$('#setDefaultRemoteExpireDate').toggleClass('hidden', !this.checked)\n\t})\n\n\t$('#enforceLinkPassword').change(function() {\n\t\t$('#selectPasswordsExcludedGroups').toggleClass('hidden', !this.checked)\n\t})\n\n\t$('#publicShareDisclaimer').change(function() {\n\t\t$('#publicShareDisclaimerText').toggleClass('hidden', !this.checked)\n\t\tif (!this.checked) {\n\t\t\tsavePublicShareDisclaimerText('')\n\t\t}\n\t})\n\n\t$('#shareApiDefaultPermissionsSection input').change(function(ev) {\n\t\tconst $el = $('#shareApiDefaultPermissions')\n\t\tconst $target = $(ev.target)\n\n\t\tlet value = $el.val()\n\t\tif ($target.is(':checked')) {\n\t\t\tvalue = value | $target.val()\n\t\t} else {\n\t\t\tvalue = value & ~$target.val()\n\t\t}\n\n\t\t// always set read permission\n\t\tvalue |= OC.PERMISSION_READ\n\n\t\t// this will trigger the field's change event and will save it\n\t\t$el.val(value).change()\n\n\t\tev.preventDefault()\n\n\t\treturn false\n\t})\n\n\tconst savePublicShareDisclaimerText = _.debounce(function(value) {\n\t\tconst options = {\n\t\t\tsuccess: () => {\n\t\t\t\tOC.msg.finishedSuccess('#publicShareDisclaimerStatus', t('settings', 'Saved'))\n\t\t\t},\n\t\t\terror: () => {\n\t\t\t\tOC.msg.finishedError('#publicShareDisclaimerStatus', t('settings', 'Not saved'))\n\t\t\t},\n\t\t}\n\n\t\tOC.msg.startSaving('#publicShareDisclaimerStatus')\n\t\tif (_.isString(value) && value !== '') {\n\t\t\tOCP.AppConfig.setValue('core', 'shareapi_public_link_disclaimertext', value, options)\n\t\t} else {\n\t\t\t$('#publicShareDisclaimerText').val('')\n\t\t\tOCP.AppConfig.deleteKey('core', 'shareapi_public_link_disclaimertext', options)\n\t\t}\n\t}, 500)\n\n\t$('#publicShareDisclaimerText').on('change, keyup', function() {\n\t\tsavePublicShareDisclaimerText(this.value)\n\t})\n\n\t$('#shareapi_allow_share_dialog_user_enumeration').on('change', function() {\n\t\t$('#shareapi_restrict_user_enumeration_to_group_setting').toggleClass('hidden', !this.checked)\n\t\t$('#shareapi_restrict_user_enumeration_to_phone_setting').toggleClass('hidden', !this.checked)\n\t\t$('#shareapi_restrict_user_enumeration_combinewarning_setting').toggleClass('hidden', !this.checked)\n\t})\n\n\t$('#allowLinks').change(function() {\n\t\t$('#publicLinkSettings').toggleClass('hidden', !this.checked)\n\t\t$('#setDefaultExpireDate').toggleClass('hidden', !(this.checked && $('#shareapiDefaultExpireDate')[0].checked))\n\t})\n\n\t$('#mail_smtpauth').change(function() {\n\t\tif (!this.checked) {\n\t\t\t$('#mail_credentials').addClass('hidden')\n\t\t} else {\n\t\t\t$('#mail_credentials').removeClass('hidden')\n\t\t}\n\t})\n\n\t$('#mail_smtpmode').change(function() {\n\t\tif ($(this).val() !== 'smtp') {\n\t\t\t$('#setting_smtpauth').addClass('hidden')\n\t\t\t$('#setting_smtphost').addClass('hidden')\n\t\t\t$('#mail_smtpsecure_label').addClass('hidden')\n\t\t\t$('#mail_smtpsecure').addClass('hidden')\n\t\t\t$('#mail_credentials').addClass('hidden')\n\t\t\t$('#mail_sendmailmode_label, #mail_sendmailmode').removeClass('hidden')\n\t\t} else {\n\t\t\t$('#setting_smtpauth').removeClass('hidden')\n\t\t\t$('#setting_smtphost').removeClass('hidden')\n\t\t\t$('#mail_smtpsecure_label').removeClass('hidden')\n\t\t\t$('#mail_smtpsecure').removeClass('hidden')\n\t\t\tif ($('#mail_smtpauth').is(':checked')) {\n\t\t\t\t$('#mail_credentials').removeClass('hidden')\n\t\t\t}\n\t\t\t$('#mail_sendmailmode_label, #mail_sendmailmode').addClass('hidden')\n\t\t}\n\t})\n\n\tconst changeEmailSettings = function() {\n\t\tif (OC.PasswordConfirmation.requiresPasswordConfirmation()) {\n\t\t\tOC.PasswordConfirmation.requirePasswordConfirmation(changeEmailSettings)\n\t\t\treturn\n\t\t}\n\n\t\tOC.msg.startSaving('#mail_settings_msg')\n\t\t$.ajax({\n\t\t\turl: OC.generateUrl('/settings/admin/mailsettings'),\n\t\t\ttype: 'POST',\n\t\t\tdata: $('#mail_general_settings_form').serialize(),\n\t\t\tsuccess: () => {\n\t\t\t\tOC.msg.finishedSuccess('#mail_settings_msg', t('settings', 'Saved'))\n\t\t\t},\n\t\t\terror: (xhr) => {\n\t\t\t\tOC.msg.finishedError('#mail_settings_msg', xhr.responseJSON)\n\t\t\t},\n\t\t})\n\t}\n\n\tconst toggleEmailCredentials = function() {\n\t\tif (OC.PasswordConfirmation.requiresPasswordConfirmation()) {\n\t\t\tOC.PasswordConfirmation.requirePasswordConfirmation(toggleEmailCredentials)\n\t\t\treturn\n\t\t}\n\n\t\tOC.msg.startSaving('#mail_settings_msg')\n\t\t$.ajax({\n\t\t\turl: OC.generateUrl('/settings/admin/mailsettings/credentials'),\n\t\t\ttype: 'POST',\n\t\t\tdata: $('#mail_credentials_settings').serialize(),\n\t\t\tsuccess: () => {\n\t\t\t\tOC.msg.finishedSuccess('#mail_settings_msg', t('settings', 'Saved'))\n\t\t\t},\n\t\t\terror: (xhr) => {\n\t\t\t\tOC.msg.finishedError('#mail_settings_msg', xhr.responseJSON)\n\t\t\t},\n\t\t})\n\t}\n\n\t$('#mail_general_settings_form').change(changeEmailSettings)\n\t$('#mail_credentials_settings_submit').click(toggleEmailCredentials)\n\t$('#mail_smtppassword').click(() => {\n\t\tif (this.type === 'text' && this.value === '********') {\n\t\t\tthis.type = 'password'\n\t\t\tthis.value = ''\n\t\t}\n\t})\n\n\t$('#sendtestemail').click((event) => {\n\t\tevent.preventDefault()\n\t\tOC.msg.startAction('#sendtestmail_msg', t('settings', 'Sending…'))\n\n\t\t$.ajax({\n\t\t\turl: OC.generateUrl('/settings/admin/mailtest'),\n\t\t\ttype: 'POST',\n\t\t\tsuccess: () => {\n\t\t\t\tOC.msg.finishedSuccess('#sendtestmail_msg', t('settings', 'Email sent'))\n\t\t\t},\n\t\t\terror: (xhr) => {\n\t\t\t\tOC.msg.finishedError('#sendtestmail_msg', xhr.responseJSON)\n\t\t\t},\n\t\t})\n\t})\n\n\t$('#allowGroupSharing').change(() => {\n\t\t$('#allowGroupSharing').toggleClass('hidden', !this.checked)\n\t})\n\n\t$('#shareapiExcludeGroups').change(() => {\n\t\t$('#selectExcludedGroups').toggleClass('hidden', !this.checked)\n\t})\n\n\tconst setupChecks = () => {\n\t\t// run setup checks then gather error messages\n\t\t$.when(\n\t\t\tOC.SetupChecks.checkWebDAV(),\n\t\t\tOC.SetupChecks.checkWellKnownUrl('GET', '/.well-known/webfinger', OC.theme.docPlaceholderUrl, $('#postsetupchecks').data('check-wellknown') === true, [200, 404], true),\n\t\t\tOC.SetupChecks.checkWellKnownUrl('GET', '/.well-known/nodeinfo', OC.theme.docPlaceholderUrl, $('#postsetupchecks').data('check-wellknown') === true, [200, 404], true),\n\t\t\tOC.SetupChecks.checkWellKnownUrl('PROPFIND', '/.well-known/caldav', OC.theme.docPlaceholderUrl, $('#postsetupchecks').data('check-wellknown') === true),\n\t\t\tOC.SetupChecks.checkWellKnownUrl('PROPFIND', '/.well-known/carddav', OC.theme.docPlaceholderUrl, $('#postsetupchecks').data('check-wellknown') === true),\n\t\t\tOC.SetupChecks.checkProviderUrl(OC.getRootPath() + '/ocm-provider/', OC.theme.docPlaceholderUrl, $('#postsetupchecks').data('check-wellknown') === true),\n\t\t\tOC.SetupChecks.checkProviderUrl(OC.getRootPath() + '/ocs-provider/', OC.theme.docPlaceholderUrl, $('#postsetupchecks').data('check-wellknown') === true),\n\t\t\tOC.SetupChecks.checkSetup(),\n\t\t\tOC.SetupChecks.checkGeneric(),\n\t\t\tOC.SetupChecks.checkWOFF2Loading(OC.filePath('core', '', 'fonts/NotoSans-Regular-latin.woff2'), OC.theme.docPlaceholderUrl),\n\t\t\tOC.SetupChecks.checkDataProtected()\n\t\t).then((check1, check2, check3, check4, check5, check6, check7, check8, check9, check10, check11) => {\n\t\t\tconst messages = [].concat(check1, check2, check3, check4, check5, check6, check7, check8, check9, check10, check11)\n\t\t\tconst $el = $('#postsetupchecks')\n\t\t\t$('#security-warning-state-loading').addClass('hidden')\n\n\t\t\tlet hasMessages = false\n\t\t\tconst $errorsEl = $el.find('.errors')\n\t\t\tconst $warningsEl = $el.find('.warnings')\n\t\t\tconst $infoEl = $el.find('.info')\n\n\t\t\tfor (let i = 0; i < messages.length; i++) {\n\t\t\t\tswitch (messages[i].type) {\n\t\t\t\tcase OC.SetupChecks.MESSAGE_TYPE_INFO:\n\t\t\t\t\t$infoEl.append('<li>' + messages[i].msg + '</li>')\n\t\t\t\t\tbreak\n\t\t\t\tcase OC.SetupChecks.MESSAGE_TYPE_WARNING:\n\t\t\t\t\t$warningsEl.append('<li>' + messages[i].msg + '</li>')\n\t\t\t\t\tbreak\n\t\t\t\tcase OC.SetupChecks.MESSAGE_TYPE_ERROR:\n\t\t\t\tdefault:\n\t\t\t\t\t$errorsEl.append('<li>' + messages[i].msg + '</li>')\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($errorsEl.find('li').length > 0) {\n\t\t\t\t$errorsEl.removeClass('hidden')\n\t\t\t\thasMessages = true\n\t\t\t}\n\t\t\tif ($warningsEl.find('li').length > 0) {\n\t\t\t\t$warningsEl.removeClass('hidden')\n\t\t\t\thasMessages = true\n\t\t\t}\n\t\t\tif ($infoEl.find('li').length > 0) {\n\t\t\t\t$infoEl.removeClass('hidden')\n\t\t\t\thasMessages = true\n\t\t\t}\n\n\t\t\tif (hasMessages) {\n\t\t\t\t$('#postsetupchecks-hint').removeClass('hidden')\n\t\t\t\tif ($errorsEl.find('li').length > 0) {\n\t\t\t\t\t$('#security-warning-state-failure').removeClass('hidden')\n\t\t\t\t} else {\n\t\t\t\t\t$('#security-warning-state-warning').removeClass('hidden')\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst securityWarning = $('#security-warning')\n\t\t\t\tif (securityWarning.children('ul').children().length === 0) {\n\t\t\t\t\t$('#security-warning-state-ok').removeClass('hidden')\n\t\t\t\t} else {\n\t\t\t\t\t$('#security-warning-state-failure').removeClass('hidden')\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t}\n\n\tif (document.getElementById('security-warning') !== null) {\n\t\tsetupChecks()\n\t}\n})\n","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = {};\n__webpack_modules__[39583]();\n"],"names":["window","addEventListener","$","each","index","element","OC","Settings","setupGroupsSelect","change","ev","groups","val","JSON","stringify","OCP","AppConfig","setValue","attr","post","generateUrl","level","Log","reload","toggleClass","checked","on","this","value","replace","savePublicShareDisclaimerText","$el","$target","target","is","PERMISSION_READ","preventDefault","_","debounce","options","success","msg","finishedSuccess","t","error","finishedError","startSaving","isString","deleteKey","removeClass","addClass","changeEmailSettings","PasswordConfirmation","requiresPasswordConfirmation","requirePasswordConfirmation","ajax","url","type","data","serialize","xhr","responseJSON","click","toggleEmailCredentials","event","startAction","document","getElementById","when","SetupChecks","checkWebDAV","checkWellKnownUrl","theme","docPlaceholderUrl","checkProviderUrl","getRootPath","checkSetup","checkGeneric","checkWOFF2Loading","filePath","checkDataProtected","then","check1","check2","check3","check4","check5","check6","check7","check8","check9","check10","check11","messages","concat","hasMessages","$errorsEl","find","$warningsEl","$infoEl","i","length","MESSAGE_TYPE_INFO","append","MESSAGE_TYPE_WARNING","MESSAGE_TYPE_ERROR","children"],"sourceRoot":""} \ No newline at end of file
diff --git a/dist/settings-vue-settings-admin-security.js b/dist/settings-vue-settings-admin-security.js
index 04b8295e7c2..54d41e5c603 100644
--- a/dist/settings-vue-settings-admin-security.js
+++ b/dist/settings-vue-settings-admin-security.js
@@ -1,3 +1,3 @@
/*! For license information please see settings-vue-settings-admin-security.js.LICENSE.txt */
-!function(){"use strict";var e,n={9310:function(e,n,o){var s=o(16453),r=o(20144),i=o(4820),a=o(7811),c=o.n(a),u=o(1412),d=o.n(u),l=o(7826),p=o.n(l),f=o(67776),h=o.n(f),g=o(96486),m=o.n(g),v=o(79753),w={name:"AdminTwoFactor",components:{Multiselect:c(),Button:d(),CheckboxRadioSwitch:p(),SettingsSection:h()},data:function(){return{loading:!1,dirty:!1,groups:[],loadingGroups:!1,twoFactorAdminDoc:(0,s.loadState)("settings","two-factor-admin-doc")}},computed:{enforced:{get:function(){return this.$store.state.enforced},set:function(t){this.dirty=!0,this.$store.commit("setEnforced",t)}},enforcedGroups:{get:function(){return this.$store.state.enforcedGroups},set:function(t){this.dirty=!0,this.$store.commit("setEnforcedGroups",t)}},excludedGroups:{get:function(){return this.$store.state.excludedGroups},set:function(t){this.dirty=!0,this.$store.commit("setExcludedGroups",t)}}},mounted:function(){this.groups=m().sortedUniq(m().uniq(this.enforcedGroups.concat(this.excludedGroups))),this.searchGroup("")},methods:{searchGroup:m().debounce((function(t){var e=this;this.loadingGroups=!0,i.default.get((0,v.generateOcsUrl)("cloud/groups?offset=0&search={query}&limit=20",{query:t})).then((function(t){return t.data.ocs})).then((function(t){return t.data.groups})).then((function(t){e.groups=m().sortedUniq(m().uniq(e.groups.concat(t)))})).catch((function(t){return console.error("could not search groups",t)})).then((function(){e.loadingGroups=!1}))}),500),saveChanges:function(){var t=this;this.loading=!0;var e={enforced:this.enforced,enforcedGroups:this.enforcedGroups,excludedGroups:this.excludedGroups};i.default.put((0,v.generateUrl)("/settings/api/admin/twofactorauth"),e).then((function(t){return t.data})).then((function(e){t.state=e,t.dirty=!1})).catch((function(t){console.error("could not save changes",t)})).then((function(){t.loading=!1}))}}},b=o(93379),x=o.n(b),y=o(7795),A=o.n(y),G=o(90569),C=o.n(G),S=o(3565),_=o.n(S),k=o(19216),E=o.n(k),O=o(44589),F=o.n(O),T=o(8496),q={};q.styleTagTransform=F(),q.setAttributes=_(),q.insert=C().bind(null,"head"),q.domAPI=A(),q.insertStyleElement=E(),x()(T.Z,q),T.Z&&T.Z.locals&&T.Z.locals;var $=(0,o(51900).Z)(w,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("SettingsSection",{attrs:{title:t.t("settings","Two-Factor Authentication"),description:t.t("settings","Two-factor authentication can be enforced for all users and specific groups. If they do not have a two-factor provider configured, they will be unable to log into the system."),"doc-url":t.twoFactorAdminDoc}},[t.loading?n("p",[n("span",{staticClass:"icon-loading-small two-factor-loading"}),t._v(" "),n("span",[t._v(t._s(t.t("settings","Enforce two-factor authentication")))])]):n("CheckboxRadioSwitch",{attrs:{id:"two-factor-enforced",checked:t.enforced,type:"switch"},on:{"update:checked":function(e){t.enforced=e}}},[t._v("\n\t\t"+t._s(t.t("settings","Enforce two-factor authentication"))+"\n\t")]),t._v(" "),t.enforced?[n("h3",[t._v(t._s(t.t("settings","Limit to groups")))]),t._v("\n\t\t"+t._s(t.t("settings","Enforcement of two-factor authentication can be set for certain groups only."))+"\n\t\t"),n("p",{staticClass:"top-margin"},[t._v("\n\t\t\t"+t._s(t.t("settings","Two-factor authentication is enforced for all members of the following groups."))+"\n\t\t")]),t._v(" "),n("p",[n("Multiselect",{attrs:{options:t.groups,placeholder:t.t("settings","Enforced groups"),disabled:t.loading,multiple:!0,searchable:!0,loading:t.loadingGroups,"show-no-options":!1,"close-on-select":!1},on:{"search-change":t.searchGroup},model:{value:t.enforcedGroups,callback:function(e){t.enforcedGroups=e},expression:"enforcedGroups"}})],1),t._v(" "),n("p",{staticClass:"top-margin"},[t._v("\n\t\t\t"+t._s(t.t("settings","Two-factor authentication is not enforced for members of the following groups."))+"\n\t\t")]),t._v(" "),n("p",[n("Multiselect",{attrs:{options:t.groups,placeholder:t.t("settings","Excluded groups"),disabled:t.loading,multiple:!0,searchable:!0,loading:t.loadingGroups,"show-no-options":!1,"close-on-select":!1},on:{"search-change":t.searchGroup},model:{value:t.excludedGroups,callback:function(e){t.excludedGroups=e},expression:"excludedGroups"}})],1),t._v(" "),n("p",{staticClass:"top-margin"},[n("em",[t._v("\n\t\t\t\t"+t._s(t.t("settings","When groups are selected/excluded, they use the following logic to determine if a user has 2FA enforced: If no groups are selected, 2FA is enabled for everyone except members of the excluded groups. If groups are selected, 2FA is enabled for all members of these. If a user is both in a selected and excluded group, the selected takes precedence and 2FA is enforced."))+"\n\t\t\t")])])]:t._e(),t._v(" "),n("p",{staticClass:"top-margin"},[t.dirty?n("Button",{attrs:{type:"primary",disabled:t.loading},on:{click:t.saveChanges}},[t._v("\n\t\t\t"+t._s(t.t("settings","Save changes"))+"\n\t\t")]):t._e()],1)],2)}),[],!1,null,"63855edf",null).exports,B=o(20629);r.default.use(B.ZP);var M={setEnforced:function(t,e){r.default.set(t,"enforced",e)},setEnforcedGroups:function(t,e){r.default.set(t,"enforcedGroups",e)},setExcludedGroups:function(t,e){r.default.set(t,"excludedGroups",e)}},U=new B.yh({strict:!1,state:{enforced:!1,enforcedGroups:[],excludedGroups:[]},mutations:M});o.nc=btoa(OC.requestToken),r.default.prototype.t=t,window.OC=window.OC||{},window.OC.Settings=window.OC.Settings||{},U.replaceState((0,s.loadState)("settings","mandatory2FAState")),new(r.default.extend($))({store:U}).$mount("#two-factor-auth-settings")},8496:function(t,e,n){var o=n(87537),s=n.n(o),r=n(23645),i=n.n(r)()(s());i.push([t.id,"\n.two-factor-loading[data-v-63855edf] {\n\tdisplay: inline-block;\n\tvertical-align: sub;\n\tmargin-left: -2px;\n\tmargin-right: 1px;\n}\n.top-margin[data-v-63855edf] {\n\tmargin-top: 0.5rem;\n}\n","",{version:3,sources:["webpack://./apps/settings/src/components/AdminTwoFactor.vue"],names:[],mappings:";AAsKA;CACA,qBAAA;CACA,mBAAA;CACA,iBAAA;CACA,iBAAA;AACA;AAEA;CACA,kBAAA;AACA",sourcesContent:["<template>\n\t<SettingsSection :title=\"t('settings', 'Two-Factor Authentication')\"\n\t\t:description=\"t('settings', 'Two-factor authentication can be enforced for all users and specific groups. If they do not have a two-factor provider configured, they will be unable to log into the system.')\"\n\t\t:doc-url=\"twoFactorAdminDoc\">\n\t\t<p v-if=\"loading\">\n\t\t\t<span class=\"icon-loading-small two-factor-loading\" />\n\t\t\t<span>{{ t('settings', 'Enforce two-factor authentication') }}</span>\n\t\t</p>\n\t\t<CheckboxRadioSwitch v-else\n\t\t\tid=\"two-factor-enforced\"\n\t\t\t:checked.sync=\"enforced\"\n\t\t\ttype=\"switch\">\n\t\t\t{{ t('settings', 'Enforce two-factor authentication') }}\n\t\t</CheckboxRadioSwitch>\n\t\t<template v-if=\"enforced\">\n\t\t\t<h3>{{ t('settings', 'Limit to groups') }}</h3>\n\t\t\t{{ t('settings', 'Enforcement of two-factor authentication can be set for certain groups only.') }}\n\t\t\t<p class=\"top-margin\">\n\t\t\t\t{{ t('settings', 'Two-factor authentication is enforced for all members of the following groups.') }}\n\t\t\t</p>\n\t\t\t<p>\n\t\t\t\t<Multiselect v-model=\"enforcedGroups\"\n\t\t\t\t\t:options=\"groups\"\n\t\t\t\t\t:placeholder=\"t('settings', 'Enforced groups')\"\n\t\t\t\t\t:disabled=\"loading\"\n\t\t\t\t\t:multiple=\"true\"\n\t\t\t\t\t:searchable=\"true\"\n\t\t\t\t\t:loading=\"loadingGroups\"\n\t\t\t\t\t:show-no-options=\"false\"\n\t\t\t\t\t:close-on-select=\"false\"\n\t\t\t\t\t@search-change=\"searchGroup\" />\n\t\t\t</p>\n\t\t\t<p class=\"top-margin\">\n\t\t\t\t{{ t('settings', 'Two-factor authentication is not enforced for members of the following groups.') }}\n\t\t\t</p>\n\t\t\t<p>\n\t\t\t\t<Multiselect v-model=\"excludedGroups\"\n\t\t\t\t\t:options=\"groups\"\n\t\t\t\t\t:placeholder=\"t('settings', 'Excluded groups')\"\n\t\t\t\t\t:disabled=\"loading\"\n\t\t\t\t\t:multiple=\"true\"\n\t\t\t\t\t:searchable=\"true\"\n\t\t\t\t\t:loading=\"loadingGroups\"\n\t\t\t\t\t:show-no-options=\"false\"\n\t\t\t\t\t:close-on-select=\"false\"\n\t\t\t\t\t@search-change=\"searchGroup\" />\n\t\t\t</p>\n\t\t\t<p class=\"top-margin\">\n\t\t\t\t<em>\n\t\t\t\t\t\x3c!-- this text is also found in the documentation. update it there as well if it ever changes --\x3e\n\t\t\t\t\t{{ t('settings', 'When groups are selected/excluded, they use the following logic to determine if a user has 2FA enforced: If no groups are selected, 2FA is enabled for everyone except members of the excluded groups. If groups are selected, 2FA is enabled for all members of these. If a user is both in a selected and excluded group, the selected takes precedence and 2FA is enforced.') }}\n\t\t\t\t</em>\n\t\t\t</p>\n\t\t</template>\n\t\t<p class=\"top-margin\">\n\t\t\t<Button v-if=\"dirty\"\n\t\t\t\ttype=\"primary\"\n\t\t\t\t:disabled=\"loading\"\n\t\t\t\t@click=\"saveChanges\">\n\t\t\t\t{{ t('settings', 'Save changes') }}\n\t\t\t</Button>\n\t\t</p>\n\t</SettingsSection>\n</template>\n\n<script>\nimport axios from '@nextcloud/axios'\nimport Multiselect from '@nextcloud/vue/dist/Components/Multiselect'\nimport Button from '@nextcloud/vue/dist/Components/Button'\nimport CheckboxRadioSwitch from '@nextcloud/vue/dist/Components/CheckboxRadioSwitch'\nimport SettingsSection from '@nextcloud/vue/dist/Components/SettingsSection'\nimport { loadState } from '@nextcloud/initial-state'\n\nimport _ from 'lodash'\nimport { generateUrl, generateOcsUrl } from '@nextcloud/router'\n\nexport default {\n\tname: 'AdminTwoFactor',\n\tcomponents: {\n\t\tMultiselect,\n\t\tButton,\n\t\tCheckboxRadioSwitch,\n\t\tSettingsSection,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tloading: false,\n\t\t\tdirty: false,\n\t\t\tgroups: [],\n\t\t\tloadingGroups: false,\n\t\t\ttwoFactorAdminDoc: loadState('settings', 'two-factor-admin-doc'),\n\t\t}\n\t},\n\tcomputed: {\n\t\tenforced: {\n\t\t\tget() {\n\t\t\t\treturn this.$store.state.enforced\n\t\t\t},\n\t\t\tset(val) {\n\t\t\t\tthis.dirty = true\n\t\t\t\tthis.$store.commit('setEnforced', val)\n\t\t\t},\n\t\t},\n\t\tenforcedGroups: {\n\t\t\tget() {\n\t\t\t\treturn this.$store.state.enforcedGroups\n\t\t\t},\n\t\t\tset(val) {\n\t\t\t\tthis.dirty = true\n\t\t\t\tthis.$store.commit('setEnforcedGroups', val)\n\t\t\t},\n\t\t},\n\t\texcludedGroups: {\n\t\t\tget() {\n\t\t\t\treturn this.$store.state.excludedGroups\n\t\t\t},\n\t\t\tset(val) {\n\t\t\t\tthis.dirty = true\n\t\t\t\tthis.$store.commit('setExcludedGroups', val)\n\t\t\t},\n\t\t},\n\t},\n\tmounted() {\n\t\t// Groups are loaded dynamically, but the assigned ones *should*\n\t\t// be valid groups, so let's add them as initial state\n\t\tthis.groups = _.sortedUniq(_.uniq(this.enforcedGroups.concat(this.excludedGroups)))\n\n\t\t// Populate the groups with a first set so the dropdown is not empty\n\t\t// when opening the page the first time\n\t\tthis.searchGroup('')\n\t},\n\tmethods: {\n\t\tsearchGroup: _.debounce(function(query) {\n\t\t\tthis.loadingGroups = true\n\t\t\taxios.get(generateOcsUrl('cloud/groups?offset=0&search={query}&limit=20', { query }))\n\t\t\t\t.then(res => res.data.ocs)\n\t\t\t\t.then(ocs => ocs.data.groups)\n\t\t\t\t.then(groups => { this.groups = _.sortedUniq(_.uniq(this.groups.concat(groups))) })\n\t\t\t\t.catch(err => console.error('could not search groups', err))\n\t\t\t\t.then(() => { this.loadingGroups = false })\n\t\t}, 500),\n\n\t\tsaveChanges() {\n\t\t\tthis.loading = true\n\n\t\t\tconst data = {\n\t\t\t\tenforced: this.enforced,\n\t\t\t\tenforcedGroups: this.enforcedGroups,\n\t\t\t\texcludedGroups: this.excludedGroups,\n\t\t\t}\n\t\t\taxios.put(generateUrl('/settings/api/admin/twofactorauth'), data)\n\t\t\t\t.then(resp => resp.data)\n\t\t\t\t.then(state => {\n\t\t\t\t\tthis.state = state\n\t\t\t\t\tthis.dirty = false\n\t\t\t\t})\n\t\t\t\t.catch(err => {\n\t\t\t\t\tconsole.error('could not save changes', err)\n\t\t\t\t})\n\t\t\t\t.then(() => { this.loading = false })\n\t\t},\n\t},\n}\n<\/script>\n\n<style scoped>\n\t.two-factor-loading {\n\t\tdisplay: inline-block;\n\t\tvertical-align: sub;\n\t\tmargin-left: -2px;\n\t\tmargin-right: 1px;\n\t}\n\n\t.top-margin {\n\t\tmargin-top: 0.5rem;\n\t}\n</style>\n"],sourceRoot:""}]),e.Z=i}},o={};function s(t){var e=o[t];if(void 0!==e)return e.exports;var r=o[t]={id:t,loaded:!1,exports:{}};return n[t].call(r.exports,r,r.exports,s),r.loaded=!0,r.exports}s.m=n,s.amdD=function(){throw new Error("define cannot be used indirect")},s.amdO={},e=[],s.O=function(t,n,o,r){if(!n){var i=1/0;for(d=0;d<e.length;d++){n=e[d][0],o=e[d][1],r=e[d][2];for(var a=!0,c=0;c<n.length;c++)(!1&r||i>=r)&&Object.keys(s.O).every((function(t){return s.O[t](n[c])}))?n.splice(c--,1):(a=!1,r<i&&(i=r));if(a){e.splice(d--,1);var u=o();void 0!==u&&(t=u)}}return t}r=r||0;for(var d=e.length;d>0&&e[d-1][2]>r;d--)e[d]=e[d-1];e[d]=[n,o,r]},s.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return s.d(e,{a:e}),e},s.d=function(t,e){for(var n in e)s.o(e,n)&&!s.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),s.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},s.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},s.nmd=function(t){return t.paths=[],t.children||(t.children=[]),t},s.j=788,function(){s.b=document.baseURI||self.location.href;var t={788:0};s.O.j=function(e){return 0===t[e]};var e=function(e,n){var o,r,i=n[0],a=n[1],c=n[2],u=0;if(i.some((function(e){return 0!==t[e]}))){for(o in a)s.o(a,o)&&(s.m[o]=a[o]);if(c)var d=c(s)}for(e&&e(n);u<i.length;u++)r=i[u],s.o(t,r)&&t[r]&&t[r][0](),t[r]=0;return s.O(d)},n=self.webpackChunknextcloud=self.webpackChunknextcloud||[];n.forEach(e.bind(null,0)),n.push=e.bind(null,n.push.bind(n))}(),s.nc=void 0;var r=s.O(void 0,[7874],(function(){return s(9310)}));r=s.O(r)}();
-//# sourceMappingURL=settings-vue-settings-admin-security.js.map?v=6fc087069634ae9044a9 \ No newline at end of file
+!function(){"use strict";var n,e={82963:function(n,e,o){var r=o(16453),s=o(20144),a=o(4820),i=o(7811),c=o.n(i),d=o(1412),l=o.n(d),u=o(7826),p=o.n(u),f=o(67776),g=o.n(f),h=o(96486),m=o.n(h),v=o(79753),b={name:"AdminTwoFactor",components:{Multiselect:c(),Button:l(),CheckboxRadioSwitch:p(),SettingsSection:g()},data:function(){return{loading:!1,dirty:!1,groups:[],loadingGroups:!1,twoFactorAdminDoc:(0,r.loadState)("settings","two-factor-admin-doc")}},computed:{enforced:{get:function(){return this.$store.state.enforced},set:function(t){this.dirty=!0,this.$store.commit("setEnforced",t)}},enforcedGroups:{get:function(){return this.$store.state.enforcedGroups},set:function(t){this.dirty=!0,this.$store.commit("setEnforcedGroups",t)}},excludedGroups:{get:function(){return this.$store.state.excludedGroups},set:function(t){this.dirty=!0,this.$store.commit("setExcludedGroups",t)}}},mounted:function(){this.groups=m().sortedUniq(m().uniq(this.enforcedGroups.concat(this.excludedGroups))),this.searchGroup("")},methods:{searchGroup:m().debounce((function(t){var n=this;this.loadingGroups=!0,a.default.get((0,v.generateOcsUrl)("cloud/groups?offset=0&search={query}&limit=20",{query:t})).then((function(t){return t.data.ocs})).then((function(t){return t.data.groups})).then((function(t){n.groups=m().sortedUniq(m().uniq(n.groups.concat(t)))})).catch((function(t){return console.error("could not search groups",t)})).then((function(){n.loadingGroups=!1}))}),500),saveChanges:function(){var t=this;this.loading=!0;var n={enforced:this.enforced,enforcedGroups:this.enforcedGroups,excludedGroups:this.excludedGroups};a.default.put((0,v.generateUrl)("/settings/api/admin/twofactorauth"),n).then((function(t){return t.data})).then((function(n){t.state=n,t.dirty=!1})).catch((function(t){console.error("could not save changes",t)})).then((function(){t.loading=!1}))}}},y=o(93379),A=o.n(y),w=o(7795),C=o.n(w),x=o(90569),_=o.n(x),k=o(3565),G=o.n(k),S=o(19216),E=o.n(S),R=o(44589),D=o.n(R),M=o(8496),O={};O.styleTagTransform=D(),O.setAttributes=G(),O.insert=_().bind(null,"head"),O.domAPI=C(),O.insertStyleElement=E(),A()(M.Z,O),M.Z&&M.Z.locals&&M.Z.locals;var B=o(51900),T=(0,B.Z)(b,(function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("SettingsSection",{attrs:{title:t.t("settings","Two-Factor Authentication"),description:t.t("settings","Two-factor authentication can be enforced for all users and specific groups. If they do not have a two-factor provider configured, they will be unable to log into the system."),"doc-url":t.twoFactorAdminDoc}},[t.loading?e("p",[e("span",{staticClass:"icon-loading-small two-factor-loading"}),t._v(" "),e("span",[t._v(t._s(t.t("settings","Enforce two-factor authentication")))])]):e("CheckboxRadioSwitch",{attrs:{id:"two-factor-enforced",checked:t.enforced,type:"switch"},on:{"update:checked":function(n){t.enforced=n}}},[t._v("\n\t\t"+t._s(t.t("settings","Enforce two-factor authentication"))+"\n\t")]),t._v(" "),t.enforced?[e("h3",[t._v(t._s(t.t("settings","Limit to groups")))]),t._v("\n\t\t"+t._s(t.t("settings","Enforcement of two-factor authentication can be set for certain groups only."))+"\n\t\t"),e("p",{staticClass:"top-margin"},[t._v("\n\t\t\t"+t._s(t.t("settings","Two-factor authentication is enforced for all members of the following groups."))+"\n\t\t")]),t._v(" "),e("p",[e("Multiselect",{attrs:{options:t.groups,placeholder:t.t("settings","Enforced groups"),disabled:t.loading,multiple:!0,searchable:!0,loading:t.loadingGroups,"show-no-options":!1,"close-on-select":!1},on:{"search-change":t.searchGroup},model:{value:t.enforcedGroups,callback:function(n){t.enforcedGroups=n},expression:"enforcedGroups"}})],1),t._v(" "),e("p",{staticClass:"top-margin"},[t._v("\n\t\t\t"+t._s(t.t("settings","Two-factor authentication is not enforced for members of the following groups."))+"\n\t\t")]),t._v(" "),e("p",[e("Multiselect",{attrs:{options:t.groups,placeholder:t.t("settings","Excluded groups"),disabled:t.loading,multiple:!0,searchable:!0,loading:t.loadingGroups,"show-no-options":!1,"close-on-select":!1},on:{"search-change":t.searchGroup},model:{value:t.excludedGroups,callback:function(n){t.excludedGroups=n},expression:"excludedGroups"}})],1),t._v(" "),e("p",{staticClass:"top-margin"},[e("em",[t._v("\n\t\t\t\t"+t._s(t.t("settings","When groups are selected/excluded, they use the following logic to determine if a user has 2FA enforced: If no groups are selected, 2FA is enabled for everyone except members of the excluded groups. If groups are selected, 2FA is enabled for all members of these. If a user is both in a selected and excluded group, the selected takes precedence and 2FA is enforced."))+"\n\t\t\t")])])]:t._e(),t._v(" "),e("p",{staticClass:"top-margin"},[t.dirty?e("Button",{attrs:{type:"primary",disabled:t.loading},on:{click:t.saveChanges}},[t._v("\n\t\t\t"+t._s(t.t("settings","Save changes"))+"\n\t\t")]):t._e()],1)],2)}),[],!1,null,"63855edf",null).exports,F=o(17499),I=o(10128),$=o.n(I),q=o(26932);function P(t,n,e,o,r,s,a){try{var i=t[s](a),c=i.value}catch(t){return void e(t)}i.done?n(c):Promise.resolve(c).then(o,r)}function U(t){return function(){var n=this,e=arguments;return new Promise((function(o,r){var s=t.apply(n,e);function a(t){P(s,o,r,a,i,"next",t)}function i(t){P(s,o,r,a,i,"throw",t)}a(void 0)}))}}var Z=(0,F.IY)().setApp("settings").detectUser().build(),j={name:"Encryption",components:{CheckboxRadioSwitch:p(),SettingsSection:g(),Button:l()},data:function(){var t=(0,r.loadState)("settings","encryption-modules");return{encryptionReady:(0,r.loadState)("settings","encryption-ready"),encryptionEnabled:(0,r.loadState)("settings","encryption-enabled"),externalBackendsEnabled:(0,r.loadState)("settings","external-backends-enabled"),encryptionAdminDoc:(0,r.loadState)("settings","encryption-admin-doc"),encryptionModules:t,shouldDisplayWarning:!1,migrating:!1,defaultCheckedModule:Object.entries(t).find((function(t){return t[1].default}))[0]}},computed:{migrationMessage:function(){return t("settings",'You need to migrate your encryption keys from the old encryption (ownCloud <= 8.0) to the new one. Please enable the "Default encryption module" and run {command}',{command:'"occ encryption:migrate"'})}},methods:{displayWarning:function(){this.encryptionEnabled?(this.encryptionEnabled=!1,this.shouldDisplayWarning=!1):this.shouldDisplayWarning=!this.shouldDisplayWarning},update:function(n,e){var o=this;return U(regeneratorRuntime.mark((function r(){var s,i,c,d,l,u;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,$()();case 2:return s=(0,v.generateOcsUrl)("/apps/provisioning_api/api/v1/config/apps/{appId}/{key}",{appId:"core",key:n}),i=e?"yes":"no",r.prev=4,r.next=7,a.default.post(s,{value:i});case 7:l=r.sent,u=l.data,o.handleResponse({status:null===(c=u.ocs)||void 0===c||null===(d=c.meta)||void 0===d?void 0:d.status}),r.next=15;break;case 12:r.prev=12,r.t0=r.catch(4),o.handleResponse({errorMessage:t("settings","Unable to update server side encryption config"),error:r.t0});case 15:case"end":return r.stop()}}),r,null,[[4,12]])})))()},checkDefaultModule:function(){var t=this;return U(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,t.update("default_encryption_module",t.defaultCheckedModule);case 2:case"end":return n.stop()}}),n)})))()},enableEncryption:function(){var t=this;return U(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t.encryptionEnabled=!0,n.next=3,t.update("encryption_enabled",!0);case 3:case"end":return n.stop()}}),n)})))()},handleResponse:function(t){return U(regeneratorRuntime.mark((function n(){var e,o,r;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:e=t.status,o=t.errorMessage,r=t.error,"ok"!==e&&((0,q.x2)(o),Z.error(o,{error:r}));case 2:case"end":return n.stop()}}),n)})))()}}},W=o(93359),L={};L.styleTagTransform=D(),L.setAttributes=G(),L.insert=_().bind(null,"head"),L.domAPI=C(),L.insertStyleElement=E(),A()(W.Z,L),W.Z&&W.Z.locals&&W.Z.locals;var Y=(0,B.Z)(j,(function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("SettingsSection",{attrs:{title:t.t("settings","Server-side encryption"),description:t.t("settings","Server-side encryption makes it possible to encrypt files which are uploaded to this server. This comes with limitations like a performance penalty, so enable this only if needed."),"doc-url":t.encryptionAdminDoc}},[e("CheckboxRadioSwitch",{attrs:{checked:t.encryptionEnabled||t.shouldDisplayWarning,disabled:t.encryptionEnabled,type:"switch"},on:{"update:checked":t.displayWarning}},[t._v("\n\t\t"+t._s(t.t("settings","Enable server-side encryption"))+"\n\t")]),t._v(" "),t.shouldDisplayWarning&&!t.encryptionEnabled?e("div",{staticClass:"notecard warning",attrs:{role:"alert"}},[e("p",[t._v(t._s(t.t("settings","Please read carefully before activating server-side encryption:")))]),t._v(" "),e("ul",[e("li",[t._v(t._s(t.t("settings","Once encryption is enabled, all files uploaded to the server from that point forward will be encrypted at rest on the server. It will only be possible to disable encryption at a later date if the active encryption module supports that function, and all pre-conditions (e.g. setting a recover key) are met.")))]),t._v(" "),e("li",[t._v(t._s(t.t("settings","Encryption alone does not guarantee security of the system. Please see documentation for more information about how the encryption app works, and the supported use cases.")))]),t._v(" "),e("li",[t._v(t._s(t.t("settings","Be aware that encryption always increases the file size.")))]),t._v(" "),e("li",[t._v(t._s(t.t("settings","It is always good to create regular backups of your data, in case of encryption make sure to backup the encryption keys along with your data.")))])]),t._v(" "),e("p",{staticClass:"margin-bottom"},[t._v("\n\t\t\t"+t._s(t.t("settings","This is the final warning: Do you really want to enable encryption?"))+"\n\t\t")]),t._v(" "),e("Button",{attrs:{type:"primary"},on:{click:function(n){return t.enableEncryption()}}},[t._v("\n\t\t\t"+t._s(t.t("settings","Enable encryption"))+"\n\t\t")])],1):t._e(),t._v(" "),t.encryptionEnabled?e("div",[t.encryptionReady?e("div",[0===t.encryptionModules.length?e("p",[t._v("\n\t\t\t\t"+t._s(t.t("settings","No encryption module loaded, please enable an encryption module in the app menu."))+"\n\t\t\t")]):[e("h3",[t._v(t._s(t.t("settings","Select default encryption module:")))]),t._v(" "),e("fieldset",t._l(t.encryptionModules,(function(n,o){return e("CheckboxRadioSwitch",{key:o,attrs:{checked:t.defaultCheckedModule,value:o,type:"radio",name:"default_encryption_module"},on:{"update:checked":[function(n){t.defaultCheckedModule=n},t.checkDefaultModule]}},[t._v("\n\t\t\t\t\t\t"+t._s(n.displayName)+"\n\t\t\t\t\t")])})),1)]],2):t.externalBackendsEnabled?e("div",{domProps:{innerHTML:t._s(t.migrationMessage)}}):t._e()]):t._e()],1)}),[],!1,null,"a04048cc",null).exports,K=o(20629);s.default.use(K.ZP);var N={setEnforced:function(t,n){s.default.set(t,"enforced",n)},setEnforcedGroups:function(t,n){s.default.set(t,"enforcedGroups",n)},setExcludedGroups:function(t,n){s.default.set(t,"excludedGroups",n)}},z=new K.yh({strict:!1,state:{enforced:!1,enforcedGroups:[],excludedGroups:[]},mutations:N});o.nc=btoa(OC.requestToken),s.default.prototype.t=t,window.OC=window.OC||{},window.OC.Settings=window.OC.Settings||{},z.replaceState((0,r.loadState)("settings","mandatory2FAState")),new(s.default.extend(T))({store:z}).$mount("#two-factor-auth-settings"),(new(s.default.extend(Y))).$mount("#vue-admin-encryption")},93359:function(t,n,e){var o=e(87537),r=e.n(o),s=e(23645),a=e.n(s)()(r());a.push([t.id,".notecard.success[data-v-a04048cc]{--note-background: rgba(var(--color-success-rgb), 0.2);--note-theme: var(--color-success)}.notecard.error[data-v-a04048cc]{--note-background: rgba(var(--color-error-rgb), 0.2);--note-theme: var(--color-error)}.notecard.warning[data-v-a04048cc]{--note-background: rgba(var(--color-warning-rgb), 0.2);--note-theme: var(--color-warning)}#body-settings .notecard[data-v-a04048cc]{color:var(--color-text-light);background-color:var(--note-background);border:1px solid var(--color-border);border-left:4px solid var(--note-theme);border-radius:var(--border-radius);box-shadow:rgba(43,42,51,.05) 0px 1px 2px 0px;margin:1rem 0;margin-top:1rem;padding:1rem}li[data-v-a04048cc]{list-style-type:initial;margin-left:1rem;padding:.25rem 0}.margin-bottom[data-v-a04048cc]{margin-bottom:.75rem}","",{version:3,sources:["webpack://./apps/settings/src/components/Encryption.vue"],names:[],mappings:"AA4KA,mCACC,sDAAA,CACA,kCAAA,CAGD,iCACC,oDAAA,CACA,gCAAA,CAGD,mCACC,sDAAA,CACA,kCAAA,CAGD,0CACC,6BAAA,CACA,uCAAA,CACA,oCAAA,CACA,uCAAA,CACA,kCAAA,CACA,6CAAA,CACA,aAAA,CACA,eAAA,CACA,YAAA,CAGD,oBACC,uBAAA,CACA,gBAAA,CACA,gBAAA,CAGD,gCACC,oBAAA",sourcesContent:["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n.notecard.success {\n\t--note-background: rgba(var(--color-success-rgb), 0.2);\n\t--note-theme: var(--color-success);\n}\n\n.notecard.error {\n\t--note-background: rgba(var(--color-error-rgb), 0.2);\n\t--note-theme: var(--color-error);\n}\n\n.notecard.warning {\n\t--note-background: rgba(var(--color-warning-rgb), 0.2);\n\t--note-theme: var(--color-warning);\n}\n\n#body-settings .notecard {\n\tcolor: var(--color-text-light);\n\tbackground-color: var(--note-background);\n\tborder: 1px solid var(--color-border);\n\tborder-left: 4px solid var(--note-theme);\n\tborder-radius: var(--border-radius);\n\tbox-shadow: rgba(43, 42, 51, 0.05) 0px 1px 2px 0px;\n\tmargin: 1rem 0;\n\tmargin-top: 1rem;\n\tpadding: 1rem;\n}\n\nli {\n\tlist-style-type: initial;\n\tmargin-left: 1rem;\n\tpadding: 0.25rem 0;\n}\n\n.margin-bottom {\n\tmargin-bottom: 0.75rem;\n}\n"],sourceRoot:""}]),n.Z=a},8496:function(t,n,e){var o=e(87537),r=e.n(o),s=e(23645),a=e.n(s)()(r());a.push([t.id,"\n.two-factor-loading[data-v-63855edf] {\n\tdisplay: inline-block;\n\tvertical-align: sub;\n\tmargin-left: -2px;\n\tmargin-right: 1px;\n}\n.top-margin[data-v-63855edf] {\n\tmargin-top: 0.5rem;\n}\n","",{version:3,sources:["webpack://./apps/settings/src/components/AdminTwoFactor.vue"],names:[],mappings:";AAsKA;CACA,qBAAA;CACA,mBAAA;CACA,iBAAA;CACA,iBAAA;AACA;AAEA;CACA,kBAAA;AACA",sourcesContent:["<template>\n\t<SettingsSection :title=\"t('settings', 'Two-Factor Authentication')\"\n\t\t:description=\"t('settings', 'Two-factor authentication can be enforced for all users and specific groups. If they do not have a two-factor provider configured, they will be unable to log into the system.')\"\n\t\t:doc-url=\"twoFactorAdminDoc\">\n\t\t<p v-if=\"loading\">\n\t\t\t<span class=\"icon-loading-small two-factor-loading\" />\n\t\t\t<span>{{ t('settings', 'Enforce two-factor authentication') }}</span>\n\t\t</p>\n\t\t<CheckboxRadioSwitch v-else\n\t\t\tid=\"two-factor-enforced\"\n\t\t\t:checked.sync=\"enforced\"\n\t\t\ttype=\"switch\">\n\t\t\t{{ t('settings', 'Enforce two-factor authentication') }}\n\t\t</CheckboxRadioSwitch>\n\t\t<template v-if=\"enforced\">\n\t\t\t<h3>{{ t('settings', 'Limit to groups') }}</h3>\n\t\t\t{{ t('settings', 'Enforcement of two-factor authentication can be set for certain groups only.') }}\n\t\t\t<p class=\"top-margin\">\n\t\t\t\t{{ t('settings', 'Two-factor authentication is enforced for all members of the following groups.') }}\n\t\t\t</p>\n\t\t\t<p>\n\t\t\t\t<Multiselect v-model=\"enforcedGroups\"\n\t\t\t\t\t:options=\"groups\"\n\t\t\t\t\t:placeholder=\"t('settings', 'Enforced groups')\"\n\t\t\t\t\t:disabled=\"loading\"\n\t\t\t\t\t:multiple=\"true\"\n\t\t\t\t\t:searchable=\"true\"\n\t\t\t\t\t:loading=\"loadingGroups\"\n\t\t\t\t\t:show-no-options=\"false\"\n\t\t\t\t\t:close-on-select=\"false\"\n\t\t\t\t\t@search-change=\"searchGroup\" />\n\t\t\t</p>\n\t\t\t<p class=\"top-margin\">\n\t\t\t\t{{ t('settings', 'Two-factor authentication is not enforced for members of the following groups.') }}\n\t\t\t</p>\n\t\t\t<p>\n\t\t\t\t<Multiselect v-model=\"excludedGroups\"\n\t\t\t\t\t:options=\"groups\"\n\t\t\t\t\t:placeholder=\"t('settings', 'Excluded groups')\"\n\t\t\t\t\t:disabled=\"loading\"\n\t\t\t\t\t:multiple=\"true\"\n\t\t\t\t\t:searchable=\"true\"\n\t\t\t\t\t:loading=\"loadingGroups\"\n\t\t\t\t\t:show-no-options=\"false\"\n\t\t\t\t\t:close-on-select=\"false\"\n\t\t\t\t\t@search-change=\"searchGroup\" />\n\t\t\t</p>\n\t\t\t<p class=\"top-margin\">\n\t\t\t\t<em>\n\t\t\t\t\t\x3c!-- this text is also found in the documentation. update it there as well if it ever changes --\x3e\n\t\t\t\t\t{{ t('settings', 'When groups are selected/excluded, they use the following logic to determine if a user has 2FA enforced: If no groups are selected, 2FA is enabled for everyone except members of the excluded groups. If groups are selected, 2FA is enabled for all members of these. If a user is both in a selected and excluded group, the selected takes precedence and 2FA is enforced.') }}\n\t\t\t\t</em>\n\t\t\t</p>\n\t\t</template>\n\t\t<p class=\"top-margin\">\n\t\t\t<Button v-if=\"dirty\"\n\t\t\t\ttype=\"primary\"\n\t\t\t\t:disabled=\"loading\"\n\t\t\t\t@click=\"saveChanges\">\n\t\t\t\t{{ t('settings', 'Save changes') }}\n\t\t\t</Button>\n\t\t</p>\n\t</SettingsSection>\n</template>\n\n<script>\nimport axios from '@nextcloud/axios'\nimport Multiselect from '@nextcloud/vue/dist/Components/Multiselect'\nimport Button from '@nextcloud/vue/dist/Components/Button'\nimport CheckboxRadioSwitch from '@nextcloud/vue/dist/Components/CheckboxRadioSwitch'\nimport SettingsSection from '@nextcloud/vue/dist/Components/SettingsSection'\nimport { loadState } from '@nextcloud/initial-state'\n\nimport _ from 'lodash'\nimport { generateUrl, generateOcsUrl } from '@nextcloud/router'\n\nexport default {\n\tname: 'AdminTwoFactor',\n\tcomponents: {\n\t\tMultiselect,\n\t\tButton,\n\t\tCheckboxRadioSwitch,\n\t\tSettingsSection,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tloading: false,\n\t\t\tdirty: false,\n\t\t\tgroups: [],\n\t\t\tloadingGroups: false,\n\t\t\ttwoFactorAdminDoc: loadState('settings', 'two-factor-admin-doc'),\n\t\t}\n\t},\n\tcomputed: {\n\t\tenforced: {\n\t\t\tget() {\n\t\t\t\treturn this.$store.state.enforced\n\t\t\t},\n\t\t\tset(val) {\n\t\t\t\tthis.dirty = true\n\t\t\t\tthis.$store.commit('setEnforced', val)\n\t\t\t},\n\t\t},\n\t\tenforcedGroups: {\n\t\t\tget() {\n\t\t\t\treturn this.$store.state.enforcedGroups\n\t\t\t},\n\t\t\tset(val) {\n\t\t\t\tthis.dirty = true\n\t\t\t\tthis.$store.commit('setEnforcedGroups', val)\n\t\t\t},\n\t\t},\n\t\texcludedGroups: {\n\t\t\tget() {\n\t\t\t\treturn this.$store.state.excludedGroups\n\t\t\t},\n\t\t\tset(val) {\n\t\t\t\tthis.dirty = true\n\t\t\t\tthis.$store.commit('setExcludedGroups', val)\n\t\t\t},\n\t\t},\n\t},\n\tmounted() {\n\t\t// Groups are loaded dynamically, but the assigned ones *should*\n\t\t// be valid groups, so let's add them as initial state\n\t\tthis.groups = _.sortedUniq(_.uniq(this.enforcedGroups.concat(this.excludedGroups)))\n\n\t\t// Populate the groups with a first set so the dropdown is not empty\n\t\t// when opening the page the first time\n\t\tthis.searchGroup('')\n\t},\n\tmethods: {\n\t\tsearchGroup: _.debounce(function(query) {\n\t\t\tthis.loadingGroups = true\n\t\t\taxios.get(generateOcsUrl('cloud/groups?offset=0&search={query}&limit=20', { query }))\n\t\t\t\t.then(res => res.data.ocs)\n\t\t\t\t.then(ocs => ocs.data.groups)\n\t\t\t\t.then(groups => { this.groups = _.sortedUniq(_.uniq(this.groups.concat(groups))) })\n\t\t\t\t.catch(err => console.error('could not search groups', err))\n\t\t\t\t.then(() => { this.loadingGroups = false })\n\t\t}, 500),\n\n\t\tsaveChanges() {\n\t\t\tthis.loading = true\n\n\t\t\tconst data = {\n\t\t\t\tenforced: this.enforced,\n\t\t\t\tenforcedGroups: this.enforcedGroups,\n\t\t\t\texcludedGroups: this.excludedGroups,\n\t\t\t}\n\t\t\taxios.put(generateUrl('/settings/api/admin/twofactorauth'), data)\n\t\t\t\t.then(resp => resp.data)\n\t\t\t\t.then(state => {\n\t\t\t\t\tthis.state = state\n\t\t\t\t\tthis.dirty = false\n\t\t\t\t})\n\t\t\t\t.catch(err => {\n\t\t\t\t\tconsole.error('could not save changes', err)\n\t\t\t\t})\n\t\t\t\t.then(() => { this.loading = false })\n\t\t},\n\t},\n}\n<\/script>\n\n<style scoped>\n\t.two-factor-loading {\n\t\tdisplay: inline-block;\n\t\tvertical-align: sub;\n\t\tmargin-left: -2px;\n\t\tmargin-right: 1px;\n\t}\n\n\t.top-margin {\n\t\tmargin-top: 0.5rem;\n\t}\n</style>\n"],sourceRoot:""}]),n.Z=a}},o={};function r(t){var n=o[t];if(void 0!==n)return n.exports;var s=o[t]={id:t,loaded:!1,exports:{}};return e[t].call(s.exports,s,s.exports,r),s.loaded=!0,s.exports}r.m=e,r.amdD=function(){throw new Error("define cannot be used indirect")},r.amdO={},n=[],r.O=function(t,e,o,s){if(!e){var a=1/0;for(l=0;l<n.length;l++){e=n[l][0],o=n[l][1],s=n[l][2];for(var i=!0,c=0;c<e.length;c++)(!1&s||a>=s)&&Object.keys(r.O).every((function(t){return r.O[t](e[c])}))?e.splice(c--,1):(i=!1,s<a&&(a=s));if(i){n.splice(l--,1);var d=o();void 0!==d&&(t=d)}}return t}s=s||0;for(var l=n.length;l>0&&n[l-1][2]>s;l--)n[l]=n[l-1];n[l]=[e,o,s]},r.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(n,{a:n}),n},r.d=function(t,n){for(var e in n)r.o(n,e)&&!r.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:n[e]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.nmd=function(t){return t.paths=[],t.children||(t.children=[]),t},r.j=788,function(){r.b=document.baseURI||self.location.href;var t={788:0};r.O.j=function(n){return 0===t[n]};var n=function(n,e){var o,s,a=e[0],i=e[1],c=e[2],d=0;if(a.some((function(n){return 0!==t[n]}))){for(o in i)r.o(i,o)&&(r.m[o]=i[o]);if(c)var l=c(r)}for(n&&n(e);d<a.length;d++)s=a[d],r.o(t,s)&&t[s]&&t[s][0](),t[s]=0;return r.O(l)},e=self.webpackChunknextcloud=self.webpackChunknextcloud||[];e.forEach(n.bind(null,0)),e.push=n.bind(null,e.push.bind(e))}(),r.nc=void 0;var s=r.O(void 0,[7874],(function(){return r(82963)}));s=r.O(s)}();
+//# sourceMappingURL=settings-vue-settings-admin-security.js.map?v=11ea9e45dc4a36d382cc \ No newline at end of file
diff --git a/dist/settings-vue-settings-admin-security.js.map b/dist/settings-vue-settings-admin-security.js.map
index 94b03db88f2..72d482c8988 100644
--- a/dist/settings-vue-settings-admin-security.js.map
+++ b/dist/settings-vue-settings-admin-security.js.map
@@ -1 +1 @@
-{"version":3,"file":"settings-vue-settings-admin-security.js?v=6fc087069634ae9044a9","mappings":";6BAAIA,0KCAuL,EC4E3L,CACA,sBACA,YACA,gBACA,WACA,wBACA,qBAEA,KARA,WASA,OACA,WACA,SACA,UACA,iBACA,uEAGA,UACA,UACA,IADA,WAEA,mCAEA,IAJA,SAIA,GACA,cACA,sCAGA,gBACA,IADA,WAEA,yCAEA,IAJA,SAIA,GACA,cACA,4CAGA,gBACA,IADA,WAEA,yCAEA,IAJA,SAIA,GACA,cACA,6CAIA,QA9CA,WAiDA,sFAIA,sBAEA,SACA,iDACA,sBACA,+FACA,uCACA,0CACA,2EACA,wEACA,yCACA,KAEA,YAXA,WAWA,WACA,gBAEA,OACA,uBACA,mCACA,oCAEA,wEACA,mCACA,kBACA,UACA,cAEA,mBACA,6CAEA,oKCpJIC,EAAU,GAEdA,EAAQC,kBAAoB,IAC5BD,EAAQE,cAAgB,IAElBF,EAAQG,OAAS,SAAc,KAAM,QAE3CH,EAAQI,OAAS,IACjBJ,EAAQK,mBAAqB,IAEhB,IAAI,IAASL,G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FlE,EAAoBqE,QAAKlE,ECGzB,IAAImE,EAAsBtE,EAAoBY,OAAET,EAAW,CAAC,OAAO,WAAa,OAAOH,EAAoB,SAC3GsE,EAAsBtE,EAAoBY,EAAE0D","sources":["webpack:///nextcloud/webpack/runtime/chunk loaded","webpack:///nextcloud/apps/settings/src/components/AdminTwoFactor.vue?vue&type=script&lang=js&","webpack:///nextcloud/apps/settings/src/components/AdminTwoFactor.vue","webpack://nextcloud/./apps/settings/src/components/AdminTwoFactor.vue?31b9","webpack://nextcloud/./apps/settings/src/components/AdminTwoFactor.vue?66cc","webpack:///nextcloud/apps/settings/src/components/AdminTwoFactor.vue?vue&type=template&id=63855edf&scoped=true&","webpack:///nextcloud/apps/settings/src/store/admin-security.js","webpack:///nextcloud/apps/settings/src/main-admin-security.js","webpack:///nextcloud/apps/settings/src/components/AdminTwoFactor.vue?vue&type=style&index=0&id=63855edf&scoped=true&lang=css&","webpack:///nextcloud/webpack/bootstrap","webpack:///nextcloud/webpack/runtime/amd define","webpack:///nextcloud/webpack/runtime/amd options","webpack:///nextcloud/webpack/runtime/compat get default export","webpack:///nextcloud/webpack/runtime/define property getters","webpack:///nextcloud/webpack/runtime/global","webpack:///nextcloud/webpack/runtime/hasOwnProperty shorthand","webpack:///nextcloud/webpack/runtime/make namespace object","webpack:///nextcloud/webpack/runtime/node module decorator","webpack:///nextcloud/webpack/runtime/runtimeId","webpack:///nextcloud/webpack/runtime/jsonp chunk loading","webpack:///nextcloud/webpack/runtime/nonce","webpack:///nextcloud/webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = function(result, chunkIds, fn, priority) {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every(function(key) { return __webpack_require__.O[key](chunkIds[j]); })) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","import mod from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AdminTwoFactor.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AdminTwoFactor.vue?vue&type=script&lang=js&\"","<template>\n\t<SettingsSection :title=\"t('settings', 'Two-Factor Authentication')\"\n\t\t:description=\"t('settings', 'Two-factor authentication can be enforced for all users and specific groups. If they do not have a two-factor provider configured, they will be unable to log into the system.')\"\n\t\t:doc-url=\"twoFactorAdminDoc\">\n\t\t<p v-if=\"loading\">\n\t\t\t<span class=\"icon-loading-small two-factor-loading\" />\n\t\t\t<span>{{ t('settings', 'Enforce two-factor authentication') }}</span>\n\t\t</p>\n\t\t<CheckboxRadioSwitch v-else\n\t\t\tid=\"two-factor-enforced\"\n\t\t\t:checked.sync=\"enforced\"\n\t\t\ttype=\"switch\">\n\t\t\t{{ t('settings', 'Enforce two-factor authentication') }}\n\t\t</CheckboxRadioSwitch>\n\t\t<template v-if=\"enforced\">\n\t\t\t<h3>{{ t('settings', 'Limit to groups') }}</h3>\n\t\t\t{{ t('settings', 'Enforcement of two-factor authentication can be set for certain groups only.') }}\n\t\t\t<p class=\"top-margin\">\n\t\t\t\t{{ t('settings', 'Two-factor authentication is enforced for all members of the following groups.') }}\n\t\t\t</p>\n\t\t\t<p>\n\t\t\t\t<Multiselect v-model=\"enforcedGroups\"\n\t\t\t\t\t:options=\"groups\"\n\t\t\t\t\t:placeholder=\"t('settings', 'Enforced groups')\"\n\t\t\t\t\t:disabled=\"loading\"\n\t\t\t\t\t:multiple=\"true\"\n\t\t\t\t\t:searchable=\"true\"\n\t\t\t\t\t:loading=\"loadingGroups\"\n\t\t\t\t\t:show-no-options=\"false\"\n\t\t\t\t\t:close-on-select=\"false\"\n\t\t\t\t\t@search-change=\"searchGroup\" />\n\t\t\t</p>\n\t\t\t<p class=\"top-margin\">\n\t\t\t\t{{ t('settings', 'Two-factor authentication is not enforced for members of the following groups.') }}\n\t\t\t</p>\n\t\t\t<p>\n\t\t\t\t<Multiselect v-model=\"excludedGroups\"\n\t\t\t\t\t:options=\"groups\"\n\t\t\t\t\t:placeholder=\"t('settings', 'Excluded groups')\"\n\t\t\t\t\t:disabled=\"loading\"\n\t\t\t\t\t:multiple=\"true\"\n\t\t\t\t\t:searchable=\"true\"\n\t\t\t\t\t:loading=\"loadingGroups\"\n\t\t\t\t\t:show-no-options=\"false\"\n\t\t\t\t\t:close-on-select=\"false\"\n\t\t\t\t\t@search-change=\"searchGroup\" />\n\t\t\t</p>\n\t\t\t<p class=\"top-margin\">\n\t\t\t\t<em>\n\t\t\t\t\t<!-- this text is also found in the documentation. update it there as well if it ever changes -->\n\t\t\t\t\t{{ t('settings', 'When groups are selected/excluded, they use the following logic to determine if a user has 2FA enforced: If no groups are selected, 2FA is enabled for everyone except members of the excluded groups. If groups are selected, 2FA is enabled for all members of these. If a user is both in a selected and excluded group, the selected takes precedence and 2FA is enforced.') }}\n\t\t\t\t</em>\n\t\t\t</p>\n\t\t</template>\n\t\t<p class=\"top-margin\">\n\t\t\t<Button v-if=\"dirty\"\n\t\t\t\ttype=\"primary\"\n\t\t\t\t:disabled=\"loading\"\n\t\t\t\t@click=\"saveChanges\">\n\t\t\t\t{{ t('settings', 'Save changes') }}\n\t\t\t</Button>\n\t\t</p>\n\t</SettingsSection>\n</template>\n\n<script>\nimport axios from '@nextcloud/axios'\nimport Multiselect from '@nextcloud/vue/dist/Components/Multiselect'\nimport Button from '@nextcloud/vue/dist/Components/Button'\nimport CheckboxRadioSwitch from '@nextcloud/vue/dist/Components/CheckboxRadioSwitch'\nimport SettingsSection from '@nextcloud/vue/dist/Components/SettingsSection'\nimport { loadState } from '@nextcloud/initial-state'\n\nimport _ from 'lodash'\nimport { generateUrl, generateOcsUrl } from '@nextcloud/router'\n\nexport default {\n\tname: 'AdminTwoFactor',\n\tcomponents: {\n\t\tMultiselect,\n\t\tButton,\n\t\tCheckboxRadioSwitch,\n\t\tSettingsSection,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tloading: false,\n\t\t\tdirty: false,\n\t\t\tgroups: [],\n\t\t\tloadingGroups: false,\n\t\t\ttwoFactorAdminDoc: loadState('settings', 'two-factor-admin-doc'),\n\t\t}\n\t},\n\tcomputed: {\n\t\tenforced: {\n\t\t\tget() {\n\t\t\t\treturn this.$store.state.enforced\n\t\t\t},\n\t\t\tset(val) {\n\t\t\t\tthis.dirty = true\n\t\t\t\tthis.$store.commit('setEnforced', val)\n\t\t\t},\n\t\t},\n\t\tenforcedGroups: {\n\t\t\tget() {\n\t\t\t\treturn this.$store.state.enforcedGroups\n\t\t\t},\n\t\t\tset(val) {\n\t\t\t\tthis.dirty = true\n\t\t\t\tthis.$store.commit('setEnforcedGroups', val)\n\t\t\t},\n\t\t},\n\t\texcludedGroups: {\n\t\t\tget() {\n\t\t\t\treturn this.$store.state.excludedGroups\n\t\t\t},\n\t\t\tset(val) {\n\t\t\t\tthis.dirty = true\n\t\t\t\tthis.$store.commit('setExcludedGroups', val)\n\t\t\t},\n\t\t},\n\t},\n\tmounted() {\n\t\t// Groups are loaded dynamically, but the assigned ones *should*\n\t\t// be valid groups, so let's add them as initial state\n\t\tthis.groups = _.sortedUniq(_.uniq(this.enforcedGroups.concat(this.excludedGroups)))\n\n\t\t// Populate the groups with a first set so the dropdown is not empty\n\t\t// when opening the page the first time\n\t\tthis.searchGroup('')\n\t},\n\tmethods: {\n\t\tsearchGroup: _.debounce(function(query) {\n\t\t\tthis.loadingGroups = true\n\t\t\taxios.get(generateOcsUrl('cloud/groups?offset=0&search={query}&limit=20', { query }))\n\t\t\t\t.then(res => res.data.ocs)\n\t\t\t\t.then(ocs => ocs.data.groups)\n\t\t\t\t.then(groups => { this.groups = _.sortedUniq(_.uniq(this.groups.concat(groups))) })\n\t\t\t\t.catch(err => console.error('could not search groups', err))\n\t\t\t\t.then(() => { this.loadingGroups = false })\n\t\t}, 500),\n\n\t\tsaveChanges() {\n\t\t\tthis.loading = true\n\n\t\t\tconst data = {\n\t\t\t\tenforced: this.enforced,\n\t\t\t\tenforcedGroups: this.enforcedGroups,\n\t\t\t\texcludedGroups: this.excludedGroups,\n\t\t\t}\n\t\t\taxios.put(generateUrl('/settings/api/admin/twofactorauth'), data)\n\t\t\t\t.then(resp => resp.data)\n\t\t\t\t.then(state => {\n\t\t\t\t\tthis.state = state\n\t\t\t\t\tthis.dirty = false\n\t\t\t\t})\n\t\t\t\t.catch(err => {\n\t\t\t\t\tconsole.error('could not save changes', err)\n\t\t\t\t})\n\t\t\t\t.then(() => { this.loading = false })\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n\t.two-factor-loading {\n\t\tdisplay: inline-block;\n\t\tvertical-align: sub;\n\t\tmargin-left: -2px;\n\t\tmargin-right: 1px;\n\t}\n\n\t.top-margin {\n\t\tmargin-top: 0.5rem;\n\t}\n</style>\n","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AdminTwoFactor.vue?vue&type=style&index=0&id=63855edf&scoped=true&lang=css&\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AdminTwoFactor.vue?vue&type=style&index=0&id=63855edf&scoped=true&lang=css&\";\n export default content && content.locals ? content.locals : undefined;\n","import { render, staticRenderFns } from \"./AdminTwoFactor.vue?vue&type=template&id=63855edf&scoped=true&\"\nimport script from \"./AdminTwoFactor.vue?vue&type=script&lang=js&\"\nexport * from \"./AdminTwoFactor.vue?vue&type=script&lang=js&\"\nimport style0 from \"./AdminTwoFactor.vue?vue&type=style&index=0&id=63855edf&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"63855edf\",\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('SettingsSection',{attrs:{\"title\":_vm.t('settings', 'Two-Factor Authentication'),\"description\":_vm.t('settings', 'Two-factor authentication can be enforced for all users and specific groups. If they do not have a two-factor provider configured, they will be unable to log into the system.'),\"doc-url\":_vm.twoFactorAdminDoc}},[(_vm.loading)?_c('p',[_c('span',{staticClass:\"icon-loading-small two-factor-loading\"}),_vm._v(\" \"),_c('span',[_vm._v(_vm._s(_vm.t('settings', 'Enforce two-factor authentication')))])]):_c('CheckboxRadioSwitch',{attrs:{\"id\":\"two-factor-enforced\",\"checked\":_vm.enforced,\"type\":\"switch\"},on:{\"update:checked\":function($event){_vm.enforced=$event}}},[_vm._v(\"\\n\\t\\t\"+_vm._s(_vm.t('settings', 'Enforce two-factor authentication'))+\"\\n\\t\")]),_vm._v(\" \"),(_vm.enforced)?[_c('h3',[_vm._v(_vm._s(_vm.t('settings', 'Limit to groups')))]),_vm._v(\"\\n\\t\\t\"+_vm._s(_vm.t('settings', 'Enforcement of two-factor authentication can be set for certain groups only.'))+\"\\n\\t\\t\"),_c('p',{staticClass:\"top-margin\"},[_vm._v(\"\\n\\t\\t\\t\"+_vm._s(_vm.t('settings', 'Two-factor authentication is enforced for all members of the following groups.'))+\"\\n\\t\\t\")]),_vm._v(\" \"),_c('p',[_c('Multiselect',{attrs:{\"options\":_vm.groups,\"placeholder\":_vm.t('settings', 'Enforced groups'),\"disabled\":_vm.loading,\"multiple\":true,\"searchable\":true,\"loading\":_vm.loadingGroups,\"show-no-options\":false,\"close-on-select\":false},on:{\"search-change\":_vm.searchGroup},model:{value:(_vm.enforcedGroups),callback:function ($$v) {_vm.enforcedGroups=$$v},expression:\"enforcedGroups\"}})],1),_vm._v(\" \"),_c('p',{staticClass:\"top-margin\"},[_vm._v(\"\\n\\t\\t\\t\"+_vm._s(_vm.t('settings', 'Two-factor authentication is not enforced for members of the following groups.'))+\"\\n\\t\\t\")]),_vm._v(\" \"),_c('p',[_c('Multiselect',{attrs:{\"options\":_vm.groups,\"placeholder\":_vm.t('settings', 'Excluded groups'),\"disabled\":_vm.loading,\"multiple\":true,\"searchable\":true,\"loading\":_vm.loadingGroups,\"show-no-options\":false,\"close-on-select\":false},on:{\"search-change\":_vm.searchGroup},model:{value:(_vm.excludedGroups),callback:function ($$v) {_vm.excludedGroups=$$v},expression:\"excludedGroups\"}})],1),_vm._v(\" \"),_c('p',{staticClass:\"top-margin\"},[_c('em',[_vm._v(\"\\n\\t\\t\\t\\t\"+_vm._s(_vm.t('settings', 'When groups are selected/excluded, they use the following logic to determine if a user has 2FA enforced: If no groups are selected, 2FA is enabled for everyone except members of the excluded groups. If groups are selected, 2FA is enabled for all members of these. If a user is both in a selected and excluded group, the selected takes precedence and 2FA is enforced.'))+\"\\n\\t\\t\\t\")])])]:_vm._e(),_vm._v(\" \"),_c('p',{staticClass:\"top-margin\"},[(_vm.dirty)?_c('Button',{attrs:{\"type\":\"primary\",\"disabled\":_vm.loading},on:{\"click\":_vm.saveChanges}},[_vm._v(\"\\n\\t\\t\\t\"+_vm._s(_vm.t('settings', 'Save changes'))+\"\\n\\t\\t\")]):_vm._e()],1)],2)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","/**\n * @copyright 2019 Roeland Jago Douma <roeland@famdouma.nl>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n * @author Roeland Jago Douma <roeland@famdouma.nl>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\nimport Vue from 'vue'\nimport Vuex, { Store } from 'vuex'\n\nVue.use(Vuex)\n\nconst state = {\n\tenforced: false,\n\tenforcedGroups: [],\n\texcludedGroups: [],\n}\n\nconst mutations = {\n\tsetEnforced(state, enabled) {\n\t\tVue.set(state, 'enforced', enabled)\n\t},\n\tsetEnforcedGroups(state, total) {\n\t\tVue.set(state, 'enforcedGroups', total)\n\t},\n\tsetExcludedGroups(state, used) {\n\t\tVue.set(state, 'excludedGroups', used)\n\t},\n}\n\nexport default new Store({\n\tstrict: process.env.NODE_ENV !== 'production',\n\tstate,\n\tmutations,\n})\n","/**\n * @copyright Copyright (c) 2016 Christoph Wurst <christoph@winzerhof-wurst.at>\n *\n * @author Christoph Wurst <christoph@winzerhof-wurst.at>\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n * @author Roeland Jago Douma <roeland@famdouma.nl>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\nimport { loadState } from '@nextcloud/initial-state'\nimport Vue from 'vue'\n\nimport AdminTwoFactor from './components/AdminTwoFactor.vue'\nimport store from './store/admin-security'\n\n// eslint-disable-next-line camelcase\n__webpack_nonce__ = btoa(OC.requestToken)\n\nVue.prototype.t = t\n\n// Not used here but required for legacy templates\nwindow.OC = window.OC || {}\nwindow.OC.Settings = window.OC.Settings || {}\n\nstore.replaceState(\n\tloadState('settings', 'mandatory2FAState')\n)\n\nconst View = Vue.extend(AdminTwoFactor)\nnew View({\n\tstore,\n}).$mount('#two-factor-auth-settings')\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"\\n.two-factor-loading[data-v-63855edf] {\\n\\tdisplay: inline-block;\\n\\tvertical-align: sub;\\n\\tmargin-left: -2px;\\n\\tmargin-right: 1px;\\n}\\n.top-margin[data-v-63855edf] {\\n\\tmargin-top: 0.5rem;\\n}\\n\", \"\",{\"version\":3,\"sources\":[\"webpack://./apps/settings/src/components/AdminTwoFactor.vue\"],\"names\":[],\"mappings\":\";AAsKA;CACA,qBAAA;CACA,mBAAA;CACA,iBAAA;CACA,iBAAA;AACA;AAEA;CACA,kBAAA;AACA\",\"sourcesContent\":[\"<template>\\n\\t<SettingsSection :title=\\\"t('settings', 'Two-Factor Authentication')\\\"\\n\\t\\t:description=\\\"t('settings', 'Two-factor authentication can be enforced for all users and specific groups. If they do not have a two-factor provider configured, they will be unable to log into the system.')\\\"\\n\\t\\t:doc-url=\\\"twoFactorAdminDoc\\\">\\n\\t\\t<p v-if=\\\"loading\\\">\\n\\t\\t\\t<span class=\\\"icon-loading-small two-factor-loading\\\" />\\n\\t\\t\\t<span>{{ t('settings', 'Enforce two-factor authentication') }}</span>\\n\\t\\t</p>\\n\\t\\t<CheckboxRadioSwitch v-else\\n\\t\\t\\tid=\\\"two-factor-enforced\\\"\\n\\t\\t\\t:checked.sync=\\\"enforced\\\"\\n\\t\\t\\ttype=\\\"switch\\\">\\n\\t\\t\\t{{ t('settings', 'Enforce two-factor authentication') }}\\n\\t\\t</CheckboxRadioSwitch>\\n\\t\\t<template v-if=\\\"enforced\\\">\\n\\t\\t\\t<h3>{{ t('settings', 'Limit to groups') }}</h3>\\n\\t\\t\\t{{ t('settings', 'Enforcement of two-factor authentication can be set for certain groups only.') }}\\n\\t\\t\\t<p class=\\\"top-margin\\\">\\n\\t\\t\\t\\t{{ t('settings', 'Two-factor authentication is enforced for all members of the following groups.') }}\\n\\t\\t\\t</p>\\n\\t\\t\\t<p>\\n\\t\\t\\t\\t<Multiselect v-model=\\\"enforcedGroups\\\"\\n\\t\\t\\t\\t\\t:options=\\\"groups\\\"\\n\\t\\t\\t\\t\\t:placeholder=\\\"t('settings', 'Enforced groups')\\\"\\n\\t\\t\\t\\t\\t:disabled=\\\"loading\\\"\\n\\t\\t\\t\\t\\t:multiple=\\\"true\\\"\\n\\t\\t\\t\\t\\t:searchable=\\\"true\\\"\\n\\t\\t\\t\\t\\t:loading=\\\"loadingGroups\\\"\\n\\t\\t\\t\\t\\t:show-no-options=\\\"false\\\"\\n\\t\\t\\t\\t\\t:close-on-select=\\\"false\\\"\\n\\t\\t\\t\\t\\t@search-change=\\\"searchGroup\\\" />\\n\\t\\t\\t</p>\\n\\t\\t\\t<p class=\\\"top-margin\\\">\\n\\t\\t\\t\\t{{ t('settings', 'Two-factor authentication is not enforced for members of the following groups.') }}\\n\\t\\t\\t</p>\\n\\t\\t\\t<p>\\n\\t\\t\\t\\t<Multiselect v-model=\\\"excludedGroups\\\"\\n\\t\\t\\t\\t\\t:options=\\\"groups\\\"\\n\\t\\t\\t\\t\\t:placeholder=\\\"t('settings', 'Excluded groups')\\\"\\n\\t\\t\\t\\t\\t:disabled=\\\"loading\\\"\\n\\t\\t\\t\\t\\t:multiple=\\\"true\\\"\\n\\t\\t\\t\\t\\t:searchable=\\\"true\\\"\\n\\t\\t\\t\\t\\t:loading=\\\"loadingGroups\\\"\\n\\t\\t\\t\\t\\t:show-no-options=\\\"false\\\"\\n\\t\\t\\t\\t\\t:close-on-select=\\\"false\\\"\\n\\t\\t\\t\\t\\t@search-change=\\\"searchGroup\\\" />\\n\\t\\t\\t</p>\\n\\t\\t\\t<p class=\\\"top-margin\\\">\\n\\t\\t\\t\\t<em>\\n\\t\\t\\t\\t\\t<!-- this text is also found in the documentation. update it there as well if it ever changes -->\\n\\t\\t\\t\\t\\t{{ t('settings', 'When groups are selected/excluded, they use the following logic to determine if a user has 2FA enforced: If no groups are selected, 2FA is enabled for everyone except members of the excluded groups. If groups are selected, 2FA is enabled for all members of these. If a user is both in a selected and excluded group, the selected takes precedence and 2FA is enforced.') }}\\n\\t\\t\\t\\t</em>\\n\\t\\t\\t</p>\\n\\t\\t</template>\\n\\t\\t<p class=\\\"top-margin\\\">\\n\\t\\t\\t<Button v-if=\\\"dirty\\\"\\n\\t\\t\\t\\ttype=\\\"primary\\\"\\n\\t\\t\\t\\t:disabled=\\\"loading\\\"\\n\\t\\t\\t\\t@click=\\\"saveChanges\\\">\\n\\t\\t\\t\\t{{ t('settings', 'Save changes') }}\\n\\t\\t\\t</Button>\\n\\t\\t</p>\\n\\t</SettingsSection>\\n</template>\\n\\n<script>\\nimport axios from '@nextcloud/axios'\\nimport Multiselect from '@nextcloud/vue/dist/Components/Multiselect'\\nimport Button from '@nextcloud/vue/dist/Components/Button'\\nimport CheckboxRadioSwitch from '@nextcloud/vue/dist/Components/CheckboxRadioSwitch'\\nimport SettingsSection from '@nextcloud/vue/dist/Components/SettingsSection'\\nimport { loadState } from '@nextcloud/initial-state'\\n\\nimport _ from 'lodash'\\nimport { generateUrl, generateOcsUrl } from '@nextcloud/router'\\n\\nexport default {\\n\\tname: 'AdminTwoFactor',\\n\\tcomponents: {\\n\\t\\tMultiselect,\\n\\t\\tButton,\\n\\t\\tCheckboxRadioSwitch,\\n\\t\\tSettingsSection,\\n\\t},\\n\\tdata() {\\n\\t\\treturn {\\n\\t\\t\\tloading: false,\\n\\t\\t\\tdirty: false,\\n\\t\\t\\tgroups: [],\\n\\t\\t\\tloadingGroups: false,\\n\\t\\t\\ttwoFactorAdminDoc: loadState('settings', 'two-factor-admin-doc'),\\n\\t\\t}\\n\\t},\\n\\tcomputed: {\\n\\t\\tenforced: {\\n\\t\\t\\tget() {\\n\\t\\t\\t\\treturn this.$store.state.enforced\\n\\t\\t\\t},\\n\\t\\t\\tset(val) {\\n\\t\\t\\t\\tthis.dirty = true\\n\\t\\t\\t\\tthis.$store.commit('setEnforced', val)\\n\\t\\t\\t},\\n\\t\\t},\\n\\t\\tenforcedGroups: {\\n\\t\\t\\tget() {\\n\\t\\t\\t\\treturn this.$store.state.enforcedGroups\\n\\t\\t\\t},\\n\\t\\t\\tset(val) {\\n\\t\\t\\t\\tthis.dirty = true\\n\\t\\t\\t\\tthis.$store.commit('setEnforcedGroups', val)\\n\\t\\t\\t},\\n\\t\\t},\\n\\t\\texcludedGroups: {\\n\\t\\t\\tget() {\\n\\t\\t\\t\\treturn this.$store.state.excludedGroups\\n\\t\\t\\t},\\n\\t\\t\\tset(val) {\\n\\t\\t\\t\\tthis.dirty = true\\n\\t\\t\\t\\tthis.$store.commit('setExcludedGroups', val)\\n\\t\\t\\t},\\n\\t\\t},\\n\\t},\\n\\tmounted() {\\n\\t\\t// Groups are loaded dynamically, but the assigned ones *should*\\n\\t\\t// be valid groups, so let's add them as initial state\\n\\t\\tthis.groups = _.sortedUniq(_.uniq(this.enforcedGroups.concat(this.excludedGroups)))\\n\\n\\t\\t// Populate the groups with a first set so the dropdown is not empty\\n\\t\\t// when opening the page the first time\\n\\t\\tthis.searchGroup('')\\n\\t},\\n\\tmethods: {\\n\\t\\tsearchGroup: _.debounce(function(query) {\\n\\t\\t\\tthis.loadingGroups = true\\n\\t\\t\\taxios.get(generateOcsUrl('cloud/groups?offset=0&search={query}&limit=20', { query }))\\n\\t\\t\\t\\t.then(res => res.data.ocs)\\n\\t\\t\\t\\t.then(ocs => ocs.data.groups)\\n\\t\\t\\t\\t.then(groups => { this.groups = _.sortedUniq(_.uniq(this.groups.concat(groups))) })\\n\\t\\t\\t\\t.catch(err => console.error('could not search groups', err))\\n\\t\\t\\t\\t.then(() => { this.loadingGroups = false })\\n\\t\\t}, 500),\\n\\n\\t\\tsaveChanges() {\\n\\t\\t\\tthis.loading = true\\n\\n\\t\\t\\tconst data = {\\n\\t\\t\\t\\tenforced: this.enforced,\\n\\t\\t\\t\\tenforcedGroups: this.enforcedGroups,\\n\\t\\t\\t\\texcludedGroups: this.excludedGroups,\\n\\t\\t\\t}\\n\\t\\t\\taxios.put(generateUrl('/settings/api/admin/twofactorauth'), data)\\n\\t\\t\\t\\t.then(resp => resp.data)\\n\\t\\t\\t\\t.then(state => {\\n\\t\\t\\t\\t\\tthis.state = state\\n\\t\\t\\t\\t\\tthis.dirty = false\\n\\t\\t\\t\\t})\\n\\t\\t\\t\\t.catch(err => {\\n\\t\\t\\t\\t\\tconsole.error('could not save changes', err)\\n\\t\\t\\t\\t})\\n\\t\\t\\t\\t.then(() => { this.loading = false })\\n\\t\\t},\\n\\t},\\n}\\n</script>\\n\\n<style scoped>\\n\\t.two-factor-loading {\\n\\t\\tdisplay: inline-block;\\n\\t\\tvertical-align: sub;\\n\\t\\tmargin-left: -2px;\\n\\t\\tmargin-right: 1px;\\n\\t}\\n\\n\\t.top-margin {\\n\\t\\tmargin-top: 0.5rem;\\n\\t}\\n</style>\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","__webpack_require__.amdD = function () {\n\tthrow new Error('define cannot be used indirect');\n};","__webpack_require__.amdO = {};","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = function(module) {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.j = 788;","__webpack_require__.b = document.baseURI || self.location.href;\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t788: 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = function(chunkId) { return installedChunks[chunkId] === 0; };\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = function(parentChunkLoadingFunction, data) {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some(function(id) { return installedChunks[id] !== 0; })) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunknextcloud\"] = self[\"webpackChunknextcloud\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","__webpack_require__.nc = undefined;","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [7874], function() { return __webpack_require__(9310); })\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","_vm","this","_h","$createElement","_c","_self","attrs","t","twoFactorAdminDoc","staticClass","_v","_s","enforced","on","$event","groups","loading","loadingGroups","searchGroup","model","value","callback","$$v","enforcedGroups","expression","excludedGroups","_e","saveChanges","Vue","Vuex","mutations","setEnforced","state","enabled","setEnforcedGroups","total","setExcludedGroups","used","Store","strict","process","__webpack_nonce__","btoa","OC","requestToken","window","Settings","store","loadState","AdminTwoFactor","$mount","___CSS_LOADER_EXPORT___","push","module","id","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","exports","loaded","__webpack_modules__","call","m","amdD","Error","amdO","O","result","chunkIds","fn","priority","notFulfilled","Infinity","i","length","fulfilled","j","Object","keys","every","key","splice","r","n","getter","__esModule","d","a","definition","o","defineProperty","enumerable","get","g","globalThis","Function","e","obj","prop","prototype","hasOwnProperty","Symbol","toStringTag","nmd","paths","children","b","document","baseURI","self","location","href","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","data","moreModules","runtime","some","chunkLoadingGlobal","forEach","bind","nc","__webpack_exports__"],"sourceRoot":""} \ No newline at end of file
+{"version":3,"file":"settings-vue-settings-admin-security.js?v=11ea9e45dc4a36d382cc","mappings":";6BAAIA,2KCAuL,EC4E3L,CACA,sBACA,YACA,gBACA,WACA,wBACA,qBAEA,KARA,WASA,OACA,WACA,SACA,UACA,iBACA,uEAGA,UACA,UACA,IADA,WAEA,mCAEA,IAJA,SAIA,GACA,cACA,sCAGA,gBACA,IADA,WAEA,yCAEA,IAJA,SAIA,GACA,cACA,4CAGA,gBACA,IADA,WAEA,yCAEA,IAJA,SAIA,GACA,cACA,6CAIA,QA9CA,WAiDA,sFAIA,sBAEA,SACA,iDACA,sBACA,+FACA,uCACA,0CACA,2EACA,wEACA,yCACA,KAEA,YAXA,WAWA,WACA,gBAEA,OACA,uBACA,mCACA,oCAEA,wEACA,mCACA,kBACA,UACA,cAEA,mBACA,6CAEA,oKCpJIC,EAAU,GAEdA,EAAQC,kBAAoB,IAC5BD,EAAQE,cAAgB,IAElBF,EAAQG,OAAS,SAAc,KAAM,QAE3CH,EAAQI,OAAS,IACjBJ,EAAQK,mBAAqB,IAEhB,IAAI,IAASL,GAKJ,KAAW,YAAiB,WALlD,eCFA,GAXgB,OACd,GCTW,WAAa,IAAIM,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,kBAAkB,CAACE,MAAM,CAAC,MAAQN,EAAIO,EAAE,WAAY,6BAA6B,YAAcP,EAAIO,EAAE,WAAY,kLAAkL,UAAUP,EAAIQ,oBAAoB,CAAER,EAAW,QAAEI,EAAG,IAAI,CAACA,EAAG,OAAO,CAACK,YAAY,0CAA0CT,EAAIU,GAAG,KAAKN,EAAG,OAAO,CAACJ,EAAIU,GAAGV,EAAIW,GAAGX,EAAIO,EAAE,WAAY,2CAA2CH,EAAG,sBAAsB,C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,EAAoBiC,EAAEuB,EAAiBC,IAAYD,EAAgBC,IACrED,EAAgBC,GAAS,KAE1BD,EAAgBC,GAAW,EAE5B,OAAOzD,EAAoBY,EAAEC,IAG1BmD,EAAqBX,KAA4B,sBAAIA,KAA4B,uBAAK,GAC1FW,EAAmBC,QAAQP,EAAqBQ,KAAK,KAAM,IAC3DF,EAAmBlE,KAAO4D,EAAqBQ,KAAK,KAAMF,EAAmBlE,KAAKoE,KAAKF,OClDvFhE,EAAoBmE,QAAKhE,ECGzB,IAAIiE,EAAsBpE,EAAoBY,OAAET,EAAW,CAAC,OAAO,WAAa,OAAOH,EAAoB,UAC3GoE,EAAsBpE,EAAoBY,EAAEwD","sources":["webpack:///nextcloud/webpack/runtime/chunk loaded","webpack:///nextcloud/apps/settings/src/components/AdminTwoFactor.vue?vue&type=script&lang=js&","webpack:///nextcloud/apps/settings/src/components/AdminTwoFactor.vue","webpack://nextcloud/./apps/settings/src/components/AdminTwoFactor.vue?31b9","webpack://nextcloud/./apps/settings/src/components/AdminTwoFactor.vue?66cc","webpack:///nextcloud/apps/settings/src/components/AdminTwoFactor.vue?vue&type=template&id=63855edf&scoped=true&","webpack:///nextcloud/apps/settings/src/components/Encryption.vue","webpack:///nextcloud/apps/settings/src/components/Encryption.vue?vue&type=script&lang=js&","webpack://nextcloud/./apps/settings/src/components/Encryption.vue?604b","webpack://nextcloud/./apps/settings/src/components/Encryption.vue?afe4","webpack:///nextcloud/apps/settings/src/components/Encryption.vue?vue&type=template&id=a04048cc&scoped=true&","webpack:///nextcloud/apps/settings/src/store/admin-security.js","webpack:///nextcloud/apps/settings/src/main-admin-security.js","webpack:///nextcloud/apps/settings/src/components/Encryption.vue?vue&type=style&index=0&id=a04048cc&lang=scss&scoped=true&","webpack:///nextcloud/apps/settings/src/components/AdminTwoFactor.vue?vue&type=style&index=0&id=63855edf&scoped=true&lang=css&","webpack:///nextcloud/webpack/bootstrap","webpack:///nextcloud/webpack/runtime/amd define","webpack:///nextcloud/webpack/runtime/amd options","webpack:///nextcloud/webpack/runtime/compat get default export","webpack:///nextcloud/webpack/runtime/define property getters","webpack:///nextcloud/webpack/runtime/global","webpack:///nextcloud/webpack/runtime/hasOwnProperty shorthand","webpack:///nextcloud/webpack/runtime/make namespace object","webpack:///nextcloud/webpack/runtime/node module decorator","webpack:///nextcloud/webpack/runtime/runtimeId","webpack:///nextcloud/webpack/runtime/jsonp chunk loading","webpack:///nextcloud/webpack/runtime/nonce","webpack:///nextcloud/webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = function(result, chunkIds, fn, priority) {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every(function(key) { return __webpack_require__.O[key](chunkIds[j]); })) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","import mod from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AdminTwoFactor.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AdminTwoFactor.vue?vue&type=script&lang=js&\"","<template>\n\t<SettingsSection :title=\"t('settings', 'Two-Factor Authentication')\"\n\t\t:description=\"t('settings', 'Two-factor authentication can be enforced for all users and specific groups. If they do not have a two-factor provider configured, they will be unable to log into the system.')\"\n\t\t:doc-url=\"twoFactorAdminDoc\">\n\t\t<p v-if=\"loading\">\n\t\t\t<span class=\"icon-loading-small two-factor-loading\" />\n\t\t\t<span>{{ t('settings', 'Enforce two-factor authentication') }}</span>\n\t\t</p>\n\t\t<CheckboxRadioSwitch v-else\n\t\t\tid=\"two-factor-enforced\"\n\t\t\t:checked.sync=\"enforced\"\n\t\t\ttype=\"switch\">\n\t\t\t{{ t('settings', 'Enforce two-factor authentication') }}\n\t\t</CheckboxRadioSwitch>\n\t\t<template v-if=\"enforced\">\n\t\t\t<h3>{{ t('settings', 'Limit to groups') }}</h3>\n\t\t\t{{ t('settings', 'Enforcement of two-factor authentication can be set for certain groups only.') }}\n\t\t\t<p class=\"top-margin\">\n\t\t\t\t{{ t('settings', 'Two-factor authentication is enforced for all members of the following groups.') }}\n\t\t\t</p>\n\t\t\t<p>\n\t\t\t\t<Multiselect v-model=\"enforcedGroups\"\n\t\t\t\t\t:options=\"groups\"\n\t\t\t\t\t:placeholder=\"t('settings', 'Enforced groups')\"\n\t\t\t\t\t:disabled=\"loading\"\n\t\t\t\t\t:multiple=\"true\"\n\t\t\t\t\t:searchable=\"true\"\n\t\t\t\t\t:loading=\"loadingGroups\"\n\t\t\t\t\t:show-no-options=\"false\"\n\t\t\t\t\t:close-on-select=\"false\"\n\t\t\t\t\t@search-change=\"searchGroup\" />\n\t\t\t</p>\n\t\t\t<p class=\"top-margin\">\n\t\t\t\t{{ t('settings', 'Two-factor authentication is not enforced for members of the following groups.') }}\n\t\t\t</p>\n\t\t\t<p>\n\t\t\t\t<Multiselect v-model=\"excludedGroups\"\n\t\t\t\t\t:options=\"groups\"\n\t\t\t\t\t:placeholder=\"t('settings', 'Excluded groups')\"\n\t\t\t\t\t:disabled=\"loading\"\n\t\t\t\t\t:multiple=\"true\"\n\t\t\t\t\t:searchable=\"true\"\n\t\t\t\t\t:loading=\"loadingGroups\"\n\t\t\t\t\t:show-no-options=\"false\"\n\t\t\t\t\t:close-on-select=\"false\"\n\t\t\t\t\t@search-change=\"searchGroup\" />\n\t\t\t</p>\n\t\t\t<p class=\"top-margin\">\n\t\t\t\t<em>\n\t\t\t\t\t<!-- this text is also found in the documentation. update it there as well if it ever changes -->\n\t\t\t\t\t{{ t('settings', 'When groups are selected/excluded, they use the following logic to determine if a user has 2FA enforced: If no groups are selected, 2FA is enabled for everyone except members of the excluded groups. If groups are selected, 2FA is enabled for all members of these. If a user is both in a selected and excluded group, the selected takes precedence and 2FA is enforced.') }}\n\t\t\t\t</em>\n\t\t\t</p>\n\t\t</template>\n\t\t<p class=\"top-margin\">\n\t\t\t<Button v-if=\"dirty\"\n\t\t\t\ttype=\"primary\"\n\t\t\t\t:disabled=\"loading\"\n\t\t\t\t@click=\"saveChanges\">\n\t\t\t\t{{ t('settings', 'Save changes') }}\n\t\t\t</Button>\n\t\t</p>\n\t</SettingsSection>\n</template>\n\n<script>\nimport axios from '@nextcloud/axios'\nimport Multiselect from '@nextcloud/vue/dist/Components/Multiselect'\nimport Button from '@nextcloud/vue/dist/Components/Button'\nimport CheckboxRadioSwitch from '@nextcloud/vue/dist/Components/CheckboxRadioSwitch'\nimport SettingsSection from '@nextcloud/vue/dist/Components/SettingsSection'\nimport { loadState } from '@nextcloud/initial-state'\n\nimport _ from 'lodash'\nimport { generateUrl, generateOcsUrl } from '@nextcloud/router'\n\nexport default {\n\tname: 'AdminTwoFactor',\n\tcomponents: {\n\t\tMultiselect,\n\t\tButton,\n\t\tCheckboxRadioSwitch,\n\t\tSettingsSection,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tloading: false,\n\t\t\tdirty: false,\n\t\t\tgroups: [],\n\t\t\tloadingGroups: false,\n\t\t\ttwoFactorAdminDoc: loadState('settings', 'two-factor-admin-doc'),\n\t\t}\n\t},\n\tcomputed: {\n\t\tenforced: {\n\t\t\tget() {\n\t\t\t\treturn this.$store.state.enforced\n\t\t\t},\n\t\t\tset(val) {\n\t\t\t\tthis.dirty = true\n\t\t\t\tthis.$store.commit('setEnforced', val)\n\t\t\t},\n\t\t},\n\t\tenforcedGroups: {\n\t\t\tget() {\n\t\t\t\treturn this.$store.state.enforcedGroups\n\t\t\t},\n\t\t\tset(val) {\n\t\t\t\tthis.dirty = true\n\t\t\t\tthis.$store.commit('setEnforcedGroups', val)\n\t\t\t},\n\t\t},\n\t\texcludedGroups: {\n\t\t\tget() {\n\t\t\t\treturn this.$store.state.excludedGroups\n\t\t\t},\n\t\t\tset(val) {\n\t\t\t\tthis.dirty = true\n\t\t\t\tthis.$store.commit('setExcludedGroups', val)\n\t\t\t},\n\t\t},\n\t},\n\tmounted() {\n\t\t// Groups are loaded dynamically, but the assigned ones *should*\n\t\t// be valid groups, so let's add them as initial state\n\t\tthis.groups = _.sortedUniq(_.uniq(this.enforcedGroups.concat(this.excludedGroups)))\n\n\t\t// Populate the groups with a first set so the dropdown is not empty\n\t\t// when opening the page the first time\n\t\tthis.searchGroup('')\n\t},\n\tmethods: {\n\t\tsearchGroup: _.debounce(function(query) {\n\t\t\tthis.loadingGroups = true\n\t\t\taxios.get(generateOcsUrl('cloud/groups?offset=0&search={query}&limit=20', { query }))\n\t\t\t\t.then(res => res.data.ocs)\n\t\t\t\t.then(ocs => ocs.data.groups)\n\t\t\t\t.then(groups => { this.groups = _.sortedUniq(_.uniq(this.groups.concat(groups))) })\n\t\t\t\t.catch(err => console.error('could not search groups', err))\n\t\t\t\t.then(() => { this.loadingGroups = false })\n\t\t}, 500),\n\n\t\tsaveChanges() {\n\t\t\tthis.loading = true\n\n\t\t\tconst data = {\n\t\t\t\tenforced: this.enforced,\n\t\t\t\tenforcedGroups: this.enforcedGroups,\n\t\t\t\texcludedGroups: this.excludedGroups,\n\t\t\t}\n\t\t\taxios.put(generateUrl('/settings/api/admin/twofactorauth'), data)\n\t\t\t\t.then(resp => resp.data)\n\t\t\t\t.then(state => {\n\t\t\t\t\tthis.state = state\n\t\t\t\t\tthis.dirty = false\n\t\t\t\t})\n\t\t\t\t.catch(err => {\n\t\t\t\t\tconsole.error('could not save changes', err)\n\t\t\t\t})\n\t\t\t\t.then(() => { this.loading = false })\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n\t.two-factor-loading {\n\t\tdisplay: inline-block;\n\t\tvertical-align: sub;\n\t\tmargin-left: -2px;\n\t\tmargin-right: 1px;\n\t}\n\n\t.top-margin {\n\t\tmargin-top: 0.5rem;\n\t}\n</style>\n","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AdminTwoFactor.vue?vue&type=style&index=0&id=63855edf&scoped=true&lang=css&\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AdminTwoFactor.vue?vue&type=style&index=0&id=63855edf&scoped=true&lang=css&\";\n export default content && content.locals ? content.locals : undefined;\n","import { render, staticRenderFns } from \"./AdminTwoFactor.vue?vue&type=template&id=63855edf&scoped=true&\"\nimport script from \"./AdminTwoFactor.vue?vue&type=script&lang=js&\"\nexport * from \"./AdminTwoFactor.vue?vue&type=script&lang=js&\"\nimport style0 from \"./AdminTwoFactor.vue?vue&type=style&index=0&id=63855edf&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"63855edf\",\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('SettingsSection',{attrs:{\"title\":_vm.t('settings', 'Two-Factor Authentication'),\"description\":_vm.t('settings', 'Two-factor authentication can be enforced for all users and specific groups. If they do not have a two-factor provider configured, they will be unable to log into the system.'),\"doc-url\":_vm.twoFactorAdminDoc}},[(_vm.loading)?_c('p',[_c('span',{staticClass:\"icon-loading-small two-factor-loading\"}),_vm._v(\" \"),_c('span',[_vm._v(_vm._s(_vm.t('settings', 'Enforce two-factor authentication')))])]):_c('CheckboxRadioSwitch',{attrs:{\"id\":\"two-factor-enforced\",\"checked\":_vm.enforced,\"type\":\"switch\"},on:{\"update:checked\":function($event){_vm.enforced=$event}}},[_vm._v(\"\\n\\t\\t\"+_vm._s(_vm.t('settings', 'Enforce two-factor authentication'))+\"\\n\\t\")]),_vm._v(\" \"),(_vm.enforced)?[_c('h3',[_vm._v(_vm._s(_vm.t('settings', 'Limit to groups')))]),_vm._v(\"\\n\\t\\t\"+_vm._s(_vm.t('settings', 'Enforcement of two-factor authentication can be set for certain groups only.'))+\"\\n\\t\\t\"),_c('p',{staticClass:\"top-margin\"},[_vm._v(\"\\n\\t\\t\\t\"+_vm._s(_vm.t('settings', 'Two-factor authentication is enforced for all members of the following groups.'))+\"\\n\\t\\t\")]),_vm._v(\" \"),_c('p',[_c('Multiselect',{attrs:{\"options\":_vm.groups,\"placeholder\":_vm.t('settings', 'Enforced groups'),\"disabled\":_vm.loading,\"multiple\":true,\"searchable\":true,\"loading\":_vm.loadingGroups,\"show-no-options\":false,\"close-on-select\":false},on:{\"search-change\":_vm.searchGroup},model:{value:(_vm.enforcedGroups),callback:function ($$v) {_vm.enforcedGroups=$$v},expression:\"enforcedGroups\"}})],1),_vm._v(\" \"),_c('p',{staticClass:\"top-margin\"},[_vm._v(\"\\n\\t\\t\\t\"+_vm._s(_vm.t('settings', 'Two-factor authentication is not enforced for members of the following groups.'))+\"\\n\\t\\t\")]),_vm._v(\" \"),_c('p',[_c('Multiselect',{attrs:{\"options\":_vm.groups,\"placeholder\":_vm.t('settings', 'Excluded groups'),\"disabled\":_vm.loading,\"multiple\":true,\"searchable\":true,\"loading\":_vm.loadingGroups,\"show-no-options\":false,\"close-on-select\":false},on:{\"search-change\":_vm.searchGroup},model:{value:(_vm.excludedGroups),callback:function ($$v) {_vm.excludedGroups=$$v},expression:\"excludedGroups\"}})],1),_vm._v(\" \"),_c('p',{staticClass:\"top-margin\"},[_c('em',[_vm._v(\"\\n\\t\\t\\t\\t\"+_vm._s(_vm.t('settings', 'When groups are selected/excluded, they use the following logic to determine if a user has 2FA enforced: If no groups are selected, 2FA is enabled for everyone except members of the excluded groups. If groups are selected, 2FA is enabled for all members of these. If a user is both in a selected and excluded group, the selected takes precedence and 2FA is enforced.'))+\"\\n\\t\\t\\t\")])])]:_vm._e(),_vm._v(\" \"),_c('p',{staticClass:\"top-margin\"},[(_vm.dirty)?_c('Button',{attrs:{\"type\":\"primary\",\"disabled\":_vm.loading},on:{\"click\":_vm.saveChanges}},[_vm._v(\"\\n\\t\\t\\t\"+_vm._s(_vm.t('settings', 'Save changes'))+\"\\n\\t\\t\")]):_vm._e()],1)],2)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<!--\n\t- @copyright 2022 Carl Schwan <carl@carlschwan.eu>\n\t-\n\t- @author Carl Schwan <carl@carlschwan.eu>\n\t-\n\t- @license GNU AGPL version 3 or any later version\n\t-\n\t- This program is free software: you can redistribute it and/or modify\n\t- it under the terms of the GNU Affero General Public License as\n\t- published by the Free Software Foundation, either version 3 of the\n\t- License, or (at your option) any later version.\n\t-\n\t- This program is distributed in the hope that it will be useful,\n\t- but WITHOUT ANY WARRANTY; without even the implied warranty of\n\t- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n\t- GNU Affero General Public License for more details.\n\t-\n\t- You should have received a copy of the GNU Affero General Public License\n\t- along with this program. If not, see <http://www.gnu.org/licenses/>.\n\t-\n-->\n\n<template>\n\t<SettingsSection :title=\"t('settings', 'Server-side encryption')\"\n\t\t:description=\"t('settings', 'Server-side encryption makes it possible to encrypt files which are uploaded to this server. This comes with limitations like a performance penalty, so enable this only if needed.')\"\n\t\t:doc-url=\"encryptionAdminDoc\">\n\t\t<CheckboxRadioSwitch :checked=\"encryptionEnabled || shouldDisplayWarning\"\n\t\t\t:disabled=\"encryptionEnabled\"\n\t\t\ttype=\"switch\"\n\t\t\t@update:checked=\"displayWarning\">\n\t\t\t{{ t('settings', 'Enable server-side encryption') }}\n\t\t</CheckboxRadioSwitch>\n\n\t\t<div v-if=\"shouldDisplayWarning && !encryptionEnabled\" class=\"notecard warning\" role=\"alert\">\n\t\t\t<p>{{ t('settings', 'Please read carefully before activating server-side encryption:') }}</p>\n\t\t\t<ul>\n\t\t\t\t<li>{{ t('settings', 'Once encryption is enabled, all files uploaded to the server from that point forward will be encrypted at rest on the server. It will only be possible to disable encryption at a later date if the active encryption module supports that function, and all pre-conditions (e.g. setting a recover key) are met.') }}</li>\n\t\t\t\t<li>{{ t('settings', 'Encryption alone does not guarantee security of the system. Please see documentation for more information about how the encryption app works, and the supported use cases.') }}</li>\n\t\t\t\t<li>{{ t('settings', 'Be aware that encryption always increases the file size.') }}</li>\n\t\t\t\t<li>{{ t('settings', 'It is always good to create regular backups of your data, in case of encryption make sure to backup the encryption keys along with your data.') }}</li>\n\t\t\t</ul>\n\n\t\t\t<p class=\"margin-bottom\">\n\t\t\t\t{{ t('settings', 'This is the final warning: Do you really want to enable encryption?') }}\n\t\t\t</p>\n\t\t\t<Button type=\"primary\"\n\t\t\t\t@click=\"enableEncryption()\">\n\t\t\t\t{{ t('settings', \"Enable encryption\") }}\n\t\t\t</Button>\n\t\t</div>\n\n\t\t<div v-if=\"encryptionEnabled\">\n\t\t\t<div v-if=\"encryptionReady\">\n\t\t\t\t<p v-if=\"encryptionModules.length === 0\">\n\t\t\t\t\t{{ t('settings', 'No encryption module loaded, please enable an encryption module in the app menu.') }}\n\t\t\t\t</p>\n\t\t\t\t<template v-else>\n\t\t\t\t\t<h3>{{ t('settings', 'Select default encryption module:') }}</h3>\n\t\t\t\t\t<fieldset>\n\t\t\t\t\t\t<CheckboxRadioSwitch v-for=\"(module, id) in encryptionModules\"\n\t\t\t\t\t\t\t:key=\"id\"\n\t\t\t\t\t\t\t:checked.sync=\"defaultCheckedModule\"\n\t\t\t\t\t\t\t:value=\"id\"\n\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\tname=\"default_encryption_module\"\n\t\t\t\t\t\t\t@update:checked=\"checkDefaultModule\">\n\t\t\t\t\t\t\t{{ module.displayName }}\n\t\t\t\t\t\t</CheckboxRadioSwitch>\n\t\t\t\t\t</fieldset>\n\t\t\t\t</template>\n\t\t\t</div>\n\n\t\t\t<div v-else-if=\"externalBackendsEnabled\" v-html=\"migrationMessage\" />\n\t\t</div>\n\t</SettingsSection>\n</template>\n\n<script>\nimport axios from '@nextcloud/axios'\nimport CheckboxRadioSwitch from '@nextcloud/vue/dist/Components/CheckboxRadioSwitch'\nimport Button from '@nextcloud/vue/dist/Components/Button'\nimport SettingsSection from '@nextcloud/vue/dist/Components/SettingsSection'\nimport { loadState } from '@nextcloud/initial-state'\nimport { getLoggerBuilder } from '@nextcloud/logger'\n\nimport { generateOcsUrl } from '@nextcloud/router'\nimport confirmPassword from '@nextcloud/password-confirmation'\nimport { showError } from '@nextcloud/dialogs'\n\nconst logger = getLoggerBuilder()\n\t.setApp('settings')\n\t.detectUser()\n\t.build()\n\nexport default {\n\tname: 'Encryption',\n\tcomponents: {\n\t\tCheckboxRadioSwitch,\n\t\tSettingsSection,\n\t\tButton,\n\t},\n\tdata() {\n\t\tconst encryptionModules = loadState('settings', 'encryption-modules')\n\t\treturn {\n\t\t\tencryptionReady: loadState('settings', 'encryption-ready'),\n\t\t\tencryptionEnabled: loadState('settings', 'encryption-enabled'),\n\t\t\texternalBackendsEnabled: loadState('settings', 'external-backends-enabled'),\n\t\t\tencryptionAdminDoc: loadState('settings', 'encryption-admin-doc'),\n\t\t\tencryptionModules,\n\t\t\tshouldDisplayWarning: false,\n\t\t\tmigrating: false,\n\t\t\tdefaultCheckedModule: Object.entries(encryptionModules).find((module) => module[1].default)[0],\n\t\t}\n\t},\n\tcomputed: {\n\t\tmigrationMessage() {\n\t\t\treturn t('settings', 'You need to migrate your encryption keys from the old encryption (ownCloud <= 8.0) to the new one. Please enable the \"Default encryption module\" and run {command}', {\n\t\t\t\tcommand: '\"occ encryption:migrate\"',\n\t\t\t})\n\t\t},\n\t},\n\tmethods: {\n\t\tdisplayWarning() {\n\t\t\tif (!this.encryptionEnabled) {\n\t\t\t\tthis.shouldDisplayWarning = !this.shouldDisplayWarning\n\t\t\t} else {\n\t\t\t\tthis.encryptionEnabled = false\n\t\t\t\tthis.shouldDisplayWarning = false\n\t\t\t}\n\t\t},\n\t\tasync update(key, value) {\n\t\t\tawait confirmPassword()\n\n\t\t\tconst url = generateOcsUrl('/apps/provisioning_api/api/v1/config/apps/{appId}/{key}', {\n\t\t\t\tappId: 'core',\n\t\t\t\tkey,\n\t\t\t})\n\n\t\t\tconst stringValue = value ? 'yes' : 'no'\n\t\t\ttry {\n\t\t\t\tconst { data } = await axios.post(url, {\n\t\t\t\t\tvalue: stringValue,\n\t\t\t\t})\n\t\t\t\tthis.handleResponse({\n\t\t\t\t\tstatus: data.ocs?.meta?.status,\n\t\t\t\t})\n\t\t\t} catch (e) {\n\t\t\t\tthis.handleResponse({\n\t\t\t\t\terrorMessage: t('settings', 'Unable to update server side encryption config'),\n\t\t\t\t\terror: e,\n\t\t\t\t})\n\t\t\t}\n\t\t},\n\t\tasync checkDefaultModule() {\n\t\t\tawait this.update('default_encryption_module', this.defaultCheckedModule)\n\t\t},\n\t\tasync enableEncryption() {\n\t\t\tthis.encryptionEnabled = true\n\t\t\tawait this.update('encryption_enabled', true)\n\t\t},\n\t\tasync handleResponse({ status, errorMessage, error }) {\n\t\t\tif (status !== 'ok') {\n\t\t\t\tshowError(errorMessage)\n\t\t\t\tlogger.error(errorMessage, { error })\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n\n.notecard.success {\n\t--note-background: rgba(var(--color-success-rgb), 0.2);\n\t--note-theme: var(--color-success);\n}\n\n.notecard.error {\n\t--note-background: rgba(var(--color-error-rgb), 0.2);\n\t--note-theme: var(--color-error);\n}\n\n.notecard.warning {\n\t--note-background: rgba(var(--color-warning-rgb), 0.2);\n\t--note-theme: var(--color-warning);\n}\n\n#body-settings .notecard {\n\tcolor: var(--color-text-light);\n\tbackground-color: var(--note-background);\n\tborder: 1px solid var(--color-border);\n\tborder-left: 4px solid var(--note-theme);\n\tborder-radius: var(--border-radius);\n\tbox-shadow: rgba(43, 42, 51, 0.05) 0px 1px 2px 0px;\n\tmargin: 1rem 0;\n\tmargin-top: 1rem;\n\tpadding: 1rem;\n}\n\nli {\n\tlist-style-type: initial;\n\tmargin-left: 1rem;\n\tpadding: 0.25rem 0;\n}\n\n.margin-bottom {\n\tmargin-bottom: 0.75rem;\n}\n</style>\n","import mod from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Encryption.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Encryption.vue?vue&type=script&lang=js&\"","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/sass-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Encryption.vue?vue&type=style&index=0&id=a04048cc&lang=scss&scoped=true&\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/sass-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Encryption.vue?vue&type=style&index=0&id=a04048cc&lang=scss&scoped=true&\";\n export default content && content.locals ? content.locals : undefined;\n","import { render, staticRenderFns } from \"./Encryption.vue?vue&type=template&id=a04048cc&scoped=true&\"\nimport script from \"./Encryption.vue?vue&type=script&lang=js&\"\nexport * from \"./Encryption.vue?vue&type=script&lang=js&\"\nimport style0 from \"./Encryption.vue?vue&type=style&index=0&id=a04048cc&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"a04048cc\",\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('SettingsSection',{attrs:{\"title\":_vm.t('settings', 'Server-side encryption'),\"description\":_vm.t('settings', 'Server-side encryption makes it possible to encrypt files which are uploaded to this server. This comes with limitations like a performance penalty, so enable this only if needed.'),\"doc-url\":_vm.encryptionAdminDoc}},[_c('CheckboxRadioSwitch',{attrs:{\"checked\":_vm.encryptionEnabled || _vm.shouldDisplayWarning,\"disabled\":_vm.encryptionEnabled,\"type\":\"switch\"},on:{\"update:checked\":_vm.displayWarning}},[_vm._v(\"\\n\\t\\t\"+_vm._s(_vm.t('settings', 'Enable server-side encryption'))+\"\\n\\t\")]),_vm._v(\" \"),(_vm.shouldDisplayWarning && !_vm.encryptionEnabled)?_c('div',{staticClass:\"notecard warning\",attrs:{\"role\":\"alert\"}},[_c('p',[_vm._v(_vm._s(_vm.t('settings', 'Please read carefully before activating server-side encryption:')))]),_vm._v(\" \"),_c('ul',[_c('li',[_vm._v(_vm._s(_vm.t('settings', 'Once encryption is enabled, all files uploaded to the server from that point forward will be encrypted at rest on the server. It will only be possible to disable encryption at a later date if the active encryption module supports that function, and all pre-conditions (e.g. setting a recover key) are met.')))]),_vm._v(\" \"),_c('li',[_vm._v(_vm._s(_vm.t('settings', 'Encryption alone does not guarantee security of the system. Please see documentation for more information about how the encryption app works, and the supported use cases.')))]),_vm._v(\" \"),_c('li',[_vm._v(_vm._s(_vm.t('settings', 'Be aware that encryption always increases the file size.')))]),_vm._v(\" \"),_c('li',[_vm._v(_vm._s(_vm.t('settings', 'It is always good to create regular backups of your data, in case of encryption make sure to backup the encryption keys along with your data.')))])]),_vm._v(\" \"),_c('p',{staticClass:\"margin-bottom\"},[_vm._v(\"\\n\\t\\t\\t\"+_vm._s(_vm.t('settings', 'This is the final warning: Do you really want to enable encryption?'))+\"\\n\\t\\t\")]),_vm._v(\" \"),_c('Button',{attrs:{\"type\":\"primary\"},on:{\"click\":function($event){return _vm.enableEncryption()}}},[_vm._v(\"\\n\\t\\t\\t\"+_vm._s(_vm.t('settings', \"Enable encryption\"))+\"\\n\\t\\t\")])],1):_vm._e(),_vm._v(\" \"),(_vm.encryptionEnabled)?_c('div',[(_vm.encryptionReady)?_c('div',[(_vm.encryptionModules.length === 0)?_c('p',[_vm._v(\"\\n\\t\\t\\t\\t\"+_vm._s(_vm.t('settings', 'No encryption module loaded, please enable an encryption module in the app menu.'))+\"\\n\\t\\t\\t\")]):[_c('h3',[_vm._v(_vm._s(_vm.t('settings', 'Select default encryption module:')))]),_vm._v(\" \"),_c('fieldset',_vm._l((_vm.encryptionModules),function(module,id){return _c('CheckboxRadioSwitch',{key:id,attrs:{\"checked\":_vm.defaultCheckedModule,\"value\":id,\"type\":\"radio\",\"name\":\"default_encryption_module\"},on:{\"update:checked\":[function($event){_vm.defaultCheckedModule=$event},_vm.checkDefaultModule]}},[_vm._v(\"\\n\\t\\t\\t\\t\\t\\t\"+_vm._s(module.displayName)+\"\\n\\t\\t\\t\\t\\t\")])}),1)]],2):(_vm.externalBackendsEnabled)?_c('div',{domProps:{\"innerHTML\":_vm._s(_vm.migrationMessage)}}):_vm._e()]):_vm._e()],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","/**\n * @copyright 2019 Roeland Jago Douma <roeland@famdouma.nl>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n * @author Roeland Jago Douma <roeland@famdouma.nl>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\nimport Vue from 'vue'\nimport Vuex, { Store } from 'vuex'\n\nVue.use(Vuex)\n\nconst state = {\n\tenforced: false,\n\tenforcedGroups: [],\n\texcludedGroups: [],\n}\n\nconst mutations = {\n\tsetEnforced(state, enabled) {\n\t\tVue.set(state, 'enforced', enabled)\n\t},\n\tsetEnforcedGroups(state, total) {\n\t\tVue.set(state, 'enforcedGroups', total)\n\t},\n\tsetExcludedGroups(state, used) {\n\t\tVue.set(state, 'excludedGroups', used)\n\t},\n}\n\nexport default new Store({\n\tstrict: process.env.NODE_ENV !== 'production',\n\tstate,\n\tmutations,\n})\n","/**\n * @copyright Copyright (c) 2016 Christoph Wurst <christoph@winzerhof-wurst.at>\n *\n * @author Christoph Wurst <christoph@winzerhof-wurst.at>\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n * @author Roeland Jago Douma <roeland@famdouma.nl>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\nimport { loadState } from '@nextcloud/initial-state'\nimport Vue from 'vue'\n\nimport AdminTwoFactor from './components/AdminTwoFactor.vue'\nimport Encryption from './components/Encryption.vue'\nimport store from './store/admin-security'\n\n// eslint-disable-next-line camelcase\n__webpack_nonce__ = btoa(OC.requestToken)\n\nVue.prototype.t = t\n\n// Not used here but required for legacy templates\nwindow.OC = window.OC || {}\nwindow.OC.Settings = window.OC.Settings || {}\n\nstore.replaceState(\n\tloadState('settings', 'mandatory2FAState')\n)\n\nconst View = Vue.extend(AdminTwoFactor)\nnew View({\n\tstore,\n}).$mount('#two-factor-auth-settings')\n\nconst EncryptionView = Vue.extend(Encryption)\nnew EncryptionView().$mount('#vue-admin-encryption')\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".notecard.success[data-v-a04048cc]{--note-background: rgba(var(--color-success-rgb), 0.2);--note-theme: var(--color-success)}.notecard.error[data-v-a04048cc]{--note-background: rgba(var(--color-error-rgb), 0.2);--note-theme: var(--color-error)}.notecard.warning[data-v-a04048cc]{--note-background: rgba(var(--color-warning-rgb), 0.2);--note-theme: var(--color-warning)}#body-settings .notecard[data-v-a04048cc]{color:var(--color-text-light);background-color:var(--note-background);border:1px solid var(--color-border);border-left:4px solid var(--note-theme);border-radius:var(--border-radius);box-shadow:rgba(43,42,51,.05) 0px 1px 2px 0px;margin:1rem 0;margin-top:1rem;padding:1rem}li[data-v-a04048cc]{list-style-type:initial;margin-left:1rem;padding:.25rem 0}.margin-bottom[data-v-a04048cc]{margin-bottom:.75rem}\", \"\",{\"version\":3,\"sources\":[\"webpack://./apps/settings/src/components/Encryption.vue\"],\"names\":[],\"mappings\":\"AA4KA,mCACC,sDAAA,CACA,kCAAA,CAGD,iCACC,oDAAA,CACA,gCAAA,CAGD,mCACC,sDAAA,CACA,kCAAA,CAGD,0CACC,6BAAA,CACA,uCAAA,CACA,oCAAA,CACA,uCAAA,CACA,kCAAA,CACA,6CAAA,CACA,aAAA,CACA,eAAA,CACA,YAAA,CAGD,oBACC,uBAAA,CACA,gBAAA,CACA,gBAAA,CAGD,gCACC,oBAAA\",\"sourcesContent\":[\"\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n.notecard.success {\\n\\t--note-background: rgba(var(--color-success-rgb), 0.2);\\n\\t--note-theme: var(--color-success);\\n}\\n\\n.notecard.error {\\n\\t--note-background: rgba(var(--color-error-rgb), 0.2);\\n\\t--note-theme: var(--color-error);\\n}\\n\\n.notecard.warning {\\n\\t--note-background: rgba(var(--color-warning-rgb), 0.2);\\n\\t--note-theme: var(--color-warning);\\n}\\n\\n#body-settings .notecard {\\n\\tcolor: var(--color-text-light);\\n\\tbackground-color: var(--note-background);\\n\\tborder: 1px solid var(--color-border);\\n\\tborder-left: 4px solid var(--note-theme);\\n\\tborder-radius: var(--border-radius);\\n\\tbox-shadow: rgba(43, 42, 51, 0.05) 0px 1px 2px 0px;\\n\\tmargin: 1rem 0;\\n\\tmargin-top: 1rem;\\n\\tpadding: 1rem;\\n}\\n\\nli {\\n\\tlist-style-type: initial;\\n\\tmargin-left: 1rem;\\n\\tpadding: 0.25rem 0;\\n}\\n\\n.margin-bottom {\\n\\tmargin-bottom: 0.75rem;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"\\n.two-factor-loading[data-v-63855edf] {\\n\\tdisplay: inline-block;\\n\\tvertical-align: sub;\\n\\tmargin-left: -2px;\\n\\tmargin-right: 1px;\\n}\\n.top-margin[data-v-63855edf] {\\n\\tmargin-top: 0.5rem;\\n}\\n\", \"\",{\"version\":3,\"sources\":[\"webpack://./apps/settings/src/components/AdminTwoFactor.vue\"],\"names\":[],\"mappings\":\";AAsKA;CACA,qBAAA;CACA,mBAAA;CACA,iBAAA;CACA,iBAAA;AACA;AAEA;CACA,kBAAA;AACA\",\"sourcesContent\":[\"<template>\\n\\t<SettingsSection :title=\\\"t('settings', 'Two-Factor Authentication')\\\"\\n\\t\\t:description=\\\"t('settings', 'Two-factor authentication can be enforced for all users and specific groups. If they do not have a two-factor provider configured, they will be unable to log into the system.')\\\"\\n\\t\\t:doc-url=\\\"twoFactorAdminDoc\\\">\\n\\t\\t<p v-if=\\\"loading\\\">\\n\\t\\t\\t<span class=\\\"icon-loading-small two-factor-loading\\\" />\\n\\t\\t\\t<span>{{ t('settings', 'Enforce two-factor authentication') }}</span>\\n\\t\\t</p>\\n\\t\\t<CheckboxRadioSwitch v-else\\n\\t\\t\\tid=\\\"two-factor-enforced\\\"\\n\\t\\t\\t:checked.sync=\\\"enforced\\\"\\n\\t\\t\\ttype=\\\"switch\\\">\\n\\t\\t\\t{{ t('settings', 'Enforce two-factor authentication') }}\\n\\t\\t</CheckboxRadioSwitch>\\n\\t\\t<template v-if=\\\"enforced\\\">\\n\\t\\t\\t<h3>{{ t('settings', 'Limit to groups') }}</h3>\\n\\t\\t\\t{{ t('settings', 'Enforcement of two-factor authentication can be set for certain groups only.') }}\\n\\t\\t\\t<p class=\\\"top-margin\\\">\\n\\t\\t\\t\\t{{ t('settings', 'Two-factor authentication is enforced for all members of the following groups.') }}\\n\\t\\t\\t</p>\\n\\t\\t\\t<p>\\n\\t\\t\\t\\t<Multiselect v-model=\\\"enforcedGroups\\\"\\n\\t\\t\\t\\t\\t:options=\\\"groups\\\"\\n\\t\\t\\t\\t\\t:placeholder=\\\"t('settings', 'Enforced groups')\\\"\\n\\t\\t\\t\\t\\t:disabled=\\\"loading\\\"\\n\\t\\t\\t\\t\\t:multiple=\\\"true\\\"\\n\\t\\t\\t\\t\\t:searchable=\\\"true\\\"\\n\\t\\t\\t\\t\\t:loading=\\\"loadingGroups\\\"\\n\\t\\t\\t\\t\\t:show-no-options=\\\"false\\\"\\n\\t\\t\\t\\t\\t:close-on-select=\\\"false\\\"\\n\\t\\t\\t\\t\\t@search-change=\\\"searchGroup\\\" />\\n\\t\\t\\t</p>\\n\\t\\t\\t<p class=\\\"top-margin\\\">\\n\\t\\t\\t\\t{{ t('settings', 'Two-factor authentication is not enforced for members of the following groups.') }}\\n\\t\\t\\t</p>\\n\\t\\t\\t<p>\\n\\t\\t\\t\\t<Multiselect v-model=\\\"excludedGroups\\\"\\n\\t\\t\\t\\t\\t:options=\\\"groups\\\"\\n\\t\\t\\t\\t\\t:placeholder=\\\"t('settings', 'Excluded groups')\\\"\\n\\t\\t\\t\\t\\t:disabled=\\\"loading\\\"\\n\\t\\t\\t\\t\\t:multiple=\\\"true\\\"\\n\\t\\t\\t\\t\\t:searchable=\\\"true\\\"\\n\\t\\t\\t\\t\\t:loading=\\\"loadingGroups\\\"\\n\\t\\t\\t\\t\\t:show-no-options=\\\"false\\\"\\n\\t\\t\\t\\t\\t:close-on-select=\\\"false\\\"\\n\\t\\t\\t\\t\\t@search-change=\\\"searchGroup\\\" />\\n\\t\\t\\t</p>\\n\\t\\t\\t<p class=\\\"top-margin\\\">\\n\\t\\t\\t\\t<em>\\n\\t\\t\\t\\t\\t<!-- this text is also found in the documentation. update it there as well if it ever changes -->\\n\\t\\t\\t\\t\\t{{ t('settings', 'When groups are selected/excluded, they use the following logic to determine if a user has 2FA enforced: If no groups are selected, 2FA is enabled for everyone except members of the excluded groups. If groups are selected, 2FA is enabled for all members of these. If a user is both in a selected and excluded group, the selected takes precedence and 2FA is enforced.') }}\\n\\t\\t\\t\\t</em>\\n\\t\\t\\t</p>\\n\\t\\t</template>\\n\\t\\t<p class=\\\"top-margin\\\">\\n\\t\\t\\t<Button v-if=\\\"dirty\\\"\\n\\t\\t\\t\\ttype=\\\"primary\\\"\\n\\t\\t\\t\\t:disabled=\\\"loading\\\"\\n\\t\\t\\t\\t@click=\\\"saveChanges\\\">\\n\\t\\t\\t\\t{{ t('settings', 'Save changes') }}\\n\\t\\t\\t</Button>\\n\\t\\t</p>\\n\\t</SettingsSection>\\n</template>\\n\\n<script>\\nimport axios from '@nextcloud/axios'\\nimport Multiselect from '@nextcloud/vue/dist/Components/Multiselect'\\nimport Button from '@nextcloud/vue/dist/Components/Button'\\nimport CheckboxRadioSwitch from '@nextcloud/vue/dist/Components/CheckboxRadioSwitch'\\nimport SettingsSection from '@nextcloud/vue/dist/Components/SettingsSection'\\nimport { loadState } from '@nextcloud/initial-state'\\n\\nimport _ from 'lodash'\\nimport { generateUrl, generateOcsUrl } from '@nextcloud/router'\\n\\nexport default {\\n\\tname: 'AdminTwoFactor',\\n\\tcomponents: {\\n\\t\\tMultiselect,\\n\\t\\tButton,\\n\\t\\tCheckboxRadioSwitch,\\n\\t\\tSettingsSection,\\n\\t},\\n\\tdata() {\\n\\t\\treturn {\\n\\t\\t\\tloading: false,\\n\\t\\t\\tdirty: false,\\n\\t\\t\\tgroups: [],\\n\\t\\t\\tloadingGroups: false,\\n\\t\\t\\ttwoFactorAdminDoc: loadState('settings', 'two-factor-admin-doc'),\\n\\t\\t}\\n\\t},\\n\\tcomputed: {\\n\\t\\tenforced: {\\n\\t\\t\\tget() {\\n\\t\\t\\t\\treturn this.$store.state.enforced\\n\\t\\t\\t},\\n\\t\\t\\tset(val) {\\n\\t\\t\\t\\tthis.dirty = true\\n\\t\\t\\t\\tthis.$store.commit('setEnforced', val)\\n\\t\\t\\t},\\n\\t\\t},\\n\\t\\tenforcedGroups: {\\n\\t\\t\\tget() {\\n\\t\\t\\t\\treturn this.$store.state.enforcedGroups\\n\\t\\t\\t},\\n\\t\\t\\tset(val) {\\n\\t\\t\\t\\tthis.dirty = true\\n\\t\\t\\t\\tthis.$store.commit('setEnforcedGroups', val)\\n\\t\\t\\t},\\n\\t\\t},\\n\\t\\texcludedGroups: {\\n\\t\\t\\tget() {\\n\\t\\t\\t\\treturn this.$store.state.excludedGroups\\n\\t\\t\\t},\\n\\t\\t\\tset(val) {\\n\\t\\t\\t\\tthis.dirty = true\\n\\t\\t\\t\\tthis.$store.commit('setExcludedGroups', val)\\n\\t\\t\\t},\\n\\t\\t},\\n\\t},\\n\\tmounted() {\\n\\t\\t// Groups are loaded dynamically, but the assigned ones *should*\\n\\t\\t// be valid groups, so let's add them as initial state\\n\\t\\tthis.groups = _.sortedUniq(_.uniq(this.enforcedGroups.concat(this.excludedGroups)))\\n\\n\\t\\t// Populate the groups with a first set so the dropdown is not empty\\n\\t\\t// when opening the page the first time\\n\\t\\tthis.searchGroup('')\\n\\t},\\n\\tmethods: {\\n\\t\\tsearchGroup: _.debounce(function(query) {\\n\\t\\t\\tthis.loadingGroups = true\\n\\t\\t\\taxios.get(generateOcsUrl('cloud/groups?offset=0&search={query}&limit=20', { query }))\\n\\t\\t\\t\\t.then(res => res.data.ocs)\\n\\t\\t\\t\\t.then(ocs => ocs.data.groups)\\n\\t\\t\\t\\t.then(groups => { this.groups = _.sortedUniq(_.uniq(this.groups.concat(groups))) })\\n\\t\\t\\t\\t.catch(err => console.error('could not search groups', err))\\n\\t\\t\\t\\t.then(() => { this.loadingGroups = false })\\n\\t\\t}, 500),\\n\\n\\t\\tsaveChanges() {\\n\\t\\t\\tthis.loading = true\\n\\n\\t\\t\\tconst data = {\\n\\t\\t\\t\\tenforced: this.enforced,\\n\\t\\t\\t\\tenforcedGroups: this.enforcedGroups,\\n\\t\\t\\t\\texcludedGroups: this.excludedGroups,\\n\\t\\t\\t}\\n\\t\\t\\taxios.put(generateUrl('/settings/api/admin/twofactorauth'), data)\\n\\t\\t\\t\\t.then(resp => resp.data)\\n\\t\\t\\t\\t.then(state => {\\n\\t\\t\\t\\t\\tthis.state = state\\n\\t\\t\\t\\t\\tthis.dirty = false\\n\\t\\t\\t\\t})\\n\\t\\t\\t\\t.catch(err => {\\n\\t\\t\\t\\t\\tconsole.error('could not save changes', err)\\n\\t\\t\\t\\t})\\n\\t\\t\\t\\t.then(() => { this.loading = false })\\n\\t\\t},\\n\\t},\\n}\\n</script>\\n\\n<style scoped>\\n\\t.two-factor-loading {\\n\\t\\tdisplay: inline-block;\\n\\t\\tvertical-align: sub;\\n\\t\\tmargin-left: -2px;\\n\\t\\tmargin-right: 1px;\\n\\t}\\n\\n\\t.top-margin {\\n\\t\\tmargin-top: 0.5rem;\\n\\t}\\n</style>\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","__webpack_require__.amdD = function () {\n\tthrow new Error('define cannot be used indirect');\n};","__webpack_require__.amdO = {};","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = function(module) {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.j = 788;","__webpack_require__.b = document.baseURI || self.location.href;\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t788: 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = function(chunkId) { return installedChunks[chunkId] === 0; };\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = function(parentChunkLoadingFunction, data) {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some(function(id) { return installedChunks[id] !== 0; })) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunknextcloud\"] = self[\"webpackChunknextcloud\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","__webpack_require__.nc = undefined;","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [7874], function() { return __webpack_require__(82963); })\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","_vm","this","_h","$createElement","_c","_self","attrs","t","twoFactorAdminDoc","staticClass","_v","_s","enforced","on","$event","groups","loading","loadingGroups","searchGroup","model","value","callback","$$v","enforcedGroups","expression","excludedGroups","_e","saveChanges","encryptionAdminDoc","encryptionEnabled","shouldDisplayWarning","displayWarning","enableEncryption","encryptionModules","length","_l","module","id","key","defaultCheckedModule","checkDefaultModule","displayName","domProps","migrationMessage","Vue","Vuex","mutations","setEnforced","state","enabled","setEnforcedGroups","total","setExcludedGroups","used","Store","strict","process","__webpack_nonce__","btoa","OC","requestToken","window","Settings","store","loadState","AdminTwoFactor","$mount","Encryption","___CSS_LOADER_EXPORT___","push","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","exports","loaded","__webpack_modules__","call","m","amdD","Error","amdO","O","result","chunkIds","fn","priority","notFulfilled","Infinity","i","fulfilled","j","Object","keys","every","splice","r","n","getter","__esModule","d","a","definition","o","defineProperty","enumerable","get","g","globalThis","Function","e","obj","prop","prototype","hasOwnProperty","Symbol","toStringTag","nmd","paths","children","b","document","baseURI","self","location","href","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","data","moreModules","runtime","some","chunkLoadingGlobal","forEach","bind","nc","__webpack_exports__"],"sourceRoot":""} \ No newline at end of file