/*! For license information please see settings-vue-settings-admin-sharing.js.LICENSE.txt */ (()=>{var t,n,e,r={23665:(t,n,e)=>{"use strict";var r=e(20144),i=e(64882),u=e(43554),o=e(31352),a=e(64024);const s=(0,r.defineComponent)({name:"SelectSharingPermissions",components:{NcCheckboxRadioSwitch:i.rw},props:{value:{type:Number,required:!0}},emits:{"update:value":t=>"number"==typeof t},data:()=>({PERMISSION_UPDATE:2,PERMISSION_CREATE:4,PERMISSION_DELETE:8,PERMISSION_SHARE:16}),computed:{canCreate(){return 0!=(this.value&this.PERMISSION_CREATE)},canUpdate(){return 0!=(this.value&this.PERMISSION_UPDATE)},canDelete(){return 0!=(this.value&this.PERMISSION_DELETE)},canShare(){return 0!=(this.value&this.PERMISSION_SHARE)}},methods:{t:o.Iu,toggle(t){this.$emit("update:value",this.value^t)}}});var c=e(93379),l=e.n(c),f=e(7795),h=e.n(f),p=e(90569),g=e.n(p),d=e(3565),v=e.n(d),_=e(19216),y=e.n(_),m=e(44589),b=e.n(m),w=e(76865),x={};x.styleTagTransform=b(),x.setAttributes=v(),x.insert=g().bind(null,"head"),x.domAPI=h(),x.insertStyleElement=y(),l()(w.Z,x),w.Z&&w.Z.locals&&w.Z.locals;var A=e(51900);const S=(0,A.Z)(s,(function(){var t=this,n=t._self._c;return t._self._setupProxy,n("fieldset",{staticClass:"permissions-select"},[n("NcCheckboxRadioSwitch",{attrs:{checked:t.canCreate},on:{"update:checked":function(n){return t.toggle(t.PERMISSION_CREATE)}}},[t._v("\n\t\t"+t._s(t.t("settings","Create"))+"\n\t")]),t._v(" "),n("NcCheckboxRadioSwitch",{attrs:{checked:t.canUpdate},on:{"update:checked":function(n){return t.toggle(t.PERMISSION_UPDATE)}}},[t._v("\n\t\t"+t._s(t.t("settings","Change"))+"\n\t")]),t._v(" "),n("NcCheckboxRadioSwitch",{attrs:{checked:t.canDelete},on:{"update:checked":function(n){return t.toggle(t.PERMISSION_DELETE)}}},[t._v("\n\t\t"+t._s(t.t("settings","Delete"))+"\n\t")]),t._v(" "),n("NcCheckboxRadioSwitch",{attrs:{checked:t.canShare},on:{"update:checked":function(n){return t.toggle(t.PERMISSION_SHARE)}}},[t._v("\n\t\t"+t._s(t.t("settings","Reshare"))+"\n\t")])],1)}),[],!1,null,"54c0ce93",null).exports;var C=e(96486),k=e(25108);const E=(0,r.defineComponent)({name:"AdminSettingsSharingForm",components:{NcCheckboxRadioSwitch:i.rw,NcSettingsSelectGroup:i.$F,NcTextArea:i.O9,NcTextField:i.h3,SelectSharingPermissions:S},data:()=>({settingsData:(0,u.j)("settings","sharingSettings")}),computed:{settings(){return k.warn("new proxy"),new Proxy(this.settingsData,{get:(t,n)=>t[n],set(t,n,e){const r=`shareapi_${(0,C.snakeCase)(n)}`,i="boolean"==typeof e?e?"yes":"no":"string"==typeof e?e:JSON.stringify(e);return window.OCP.AppConfig.setValue("core",r,i),t[n]=e,!0}})},publicShareDisclaimerEnabled:{get(){return"string"==typeof this.settingsData.publicShareDisclaimerText},set(t){t?this.settingsData.publicShareDisclaimerText="":this.onUpdateDisclaimer()}}},methods:{t:o.Iu,onUpdateDisclaimer:(0,C.debounce)((function(t){const n={success(){t?(0,a.s$)((0,o.Iu)("settings","Changed disclaimer text")):(0,a.s$)((0,o.Iu)("settings","Deleted disclaimer text"))},error(){(0,a.x2)((0,o.Iu)("settings","Could not set disclaimer text"))}};t?window.OCP.AppConfig.setValue("core","shareapi_public_link_disclaimertext",t,n):window.OCP.AppConfig.deleteKey("core","shareapi_public_link_disclaimertext",n),this.settingsData.publicShareDisclaimerText=t}),500)}}),N=E;var I=e(47236),R={};R.styleTagTransform=b(),R.setAttributes=v(),R.insert=g().bind(null,"head"),R.domAPI=h(),R.insertStyleElement=y(),l()(I.Z,R),I.Z&&I.Z.locals&&I.Z.locals;const D=(0,A.Z)(N,(function(){var t=this,n=t._self._c;return t._self._setupProxy,n("form",{staticClass:"sharing"},[n("NcCheckboxRadioSwitch",{attrs:{"aria-controls":"settings-sharing-api settings-sharing-api-settings settings-sharing-default-permissions settings-sharing-privary-related",type:"switch",checked:t.settings.enabled},on:{"update:checked":function(n){return t.$set(t.settings,"enabled",n)}}},[t._v("\n\t\t"+t._s(t.t("settings","Allow apps to use the Share API"))+"\n\t")]),t._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:t.settings.enabled,expression:"settings.enabled"}],staticClass:"sharing__sub-section",attrs:{id:"settings-sharing-api-settings"}},[n("NcCheckboxRadioSwitch",{attrs:{checked:t.settings.allowResharing},on:{"update:checked":function(n){return t.$set(t.settings,"allowResharing",n)}}},[t._v("\n\t\t\t"+t._s(t.t("settings","Allow resharing"))+"\n\t\t")]),t._v(" "),n("NcCheckboxRadioSwitch",{attrs:{checked:t.settings.allowGroupSharing},on:{"update:checked":function(n){return t.$set(t.settings,"allowGroupSharing",n)}}},[t._v("\n\t\t\t"+t._s(t.t("settings","Allow sharing with groups"))+"\n\t\t")]),t._v(" "),n("NcCheckboxRadioSwitch",{attrs:{checked:t.settings.onlyShareWithGroupMembers},on:{"update:checked":function(n){return t.$set(t.settings,"onlyShareWithGroupMembers",n)}}},[t._v("\n\t\t\t"+t._s(t.t("settings","Restrict users to only share with users in their groups"))+"\n\t\t")])],1),t._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:t.settings.enabled,expression:"settings.enabled"}],staticClass:"sharing__section",attrs:{id:"settings-sharing-api"}},[n("NcCheckboxRadioSwitch",{attrs:{type:"switch","aria-controls":"settings-sharing-api-public-link",checked:t.settings.allowLinks},on:{"update:checked":function(n){return t.$set(t.settings,"allowLinks",n)}}},[t._v("\n\t\t\t"+t._s(t.t("settings","Allow users to share via link and emails"))+"\n\t\t")]),t._v(" "),n("fieldset",{directives:[{name:"show",rawName:"v-show",value:t.settings.allowLinks,expression:"settings.allowLinks"}],staticClass:"sharing__sub-section",attrs:{id:"settings-sharing-api-public-link"}},[n("NcCheckboxRadioSwitch",{attrs:{checked:t.settings.allowPublicUpload},on:{"update:checked":function(n){return t.$set(t.settings,"allowPublicUpload",n)}}},[t._v("\n\t\t\t\t"+t._s(t.t("settings","Allow public uploads"))+"\n\t\t\t")]),t._v(" "),n("NcCheckboxRadioSwitch",{attrs:{checked:t.settings.enableLinkPasswordByDefault},on:{"update:checked":function(n){return t.$set(t.settings,"enableLinkPasswordByDefault",n)}}},[t._v("\n\t\t\t\t"+t._s(t.t("settings","Always ask for a password"))+"\n\t\t\t")]),t._v(" "),n("NcCheckboxRadioSwitch",{attrs:{checked:t.settings.enforceLinksPassword,disabled:!t.settings.enableLinkPasswordByDefault},on:{"update:checked":function(n){return t.$set(t.settings,"enforceLinksPassword",n)}}},[t._v("\n\t\t\t\t"+t._s(t.t("settings","Enforce password protection"))+"\n\t\t\t")]),t._v(" "),t.settings.passwordExcludedGroupsFeatureEnabled?n("label",{staticClass:"sharing__labeled-entry sharing__input"},[n("span",[t._v(t._s(t.t("settings","Exclude groups from password requirements")))]),t._v(" "),n("NcSettingsSelectGroup",{staticStyle:{width:"100%"},attrs:{disabled:!t.settings.enforceLinksPassword||!t.settings.enableLinkPasswordByDefault},model:{value:t.settings.passwordExcludedGroups,callback:function(n){t.$set(t.settings,"passwordExcludedGroups",n)},expression:"settings.passwordExcludedGroups"}})],1):t._e(),t._v(" "),n("label",{staticClass:"sharing__labeled-entry sharing__input"},[n("span",[t._v(t._s(t.t("settings","Exclude groups from creating link shares")))]),t._v(" "),n("NcSettingsSelectGroup",{staticStyle:{width:"100%"},attrs:{label:t.t("settings","Exclude groups from creating link shares")},model:{value:t.settings.allowLinksExcludeGroups,callback:function(n){t.$set(t.settings,"allowLinksExcludeGroups",n)},expression:"settings.allowLinksExcludeGroups"}})],1)],1),t._v(" "),n("NcCheckboxRadioSwitch",{attrs:{type:"switch",checked:t.settings.excludeGroups},on:{"update:checked":function(n){return t.$set(t.settings,"excludeGroups",n)}}},[t._v("\n\t\t\t"+t._s(t.t("settings","Exclude groups from sharing"))+"\n\t\t")]),t._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:t.settings.excludeGroups,expression:"settings.excludeGroups"}],staticClass:"sharing__sub-section"},[n("div",{staticClass:"sharing__labeled-entry sharing__input"},[n("label",{attrs:{for:"settings-sharing-excluded-groups"}},[t._v(t._s(t.t("settings","Groups excluded from sharing")))]),t._v(" "),n("NcSettingsSelectGroup",{staticStyle:{width:"100%"},attrs:{id:"settings-sharing-excluded-groups","aria-describedby":"settings-sharing-excluded-groups-desc",label:t.t("settings","Groups excluded from sharing"),disabled:!t.settings.excludeGroups},model:{value:t.settings.excludeGroupsList,callback:function(n){t.$set(t.settings,"excludeGroupsList",n)},expression:"settings.excludeGroupsList"}}),t._v(" "),n("em",{attrs:{id:"settings-sharing-excluded-groups-desc"}},[t._v(t._s(t.t("settings","These groups will still be able to receive shares, but not to initiate them.")))])],1)]),t._v(" "),n("NcCheckboxRadioSwitch",{attrs:{type:"switch","aria-controls":"settings-sharing-api-expiration",checked:t.settings.defaultInternalExpireDate},on:{"update:checked":function(n){return t.$set(t.settings,"defaultInternalExpireDate",n)}}},[t._v("\n\t\t\t"+t._s(t.t("settings","Set default expiration date for shares"))+"\n\t\t")]),t._v(" "),n("fieldset",{directives:[{name:"show",rawName:"v-show",value:t.settings.defaultInternalExpireDate,expression:"settings.defaultInternalExpireDate"}],staticClass:"sharing__sub-section",attrs:{id:"settings-sharing-api-expiration"}},[n("NcCheckboxRadioSwitch",{attrs:{checked:t.settings.enforceInternalExpireDate},on:{"update:checked":function(n){return t.$set(t.settings,"enforceInternalExpireDate",n)}}},[t._v("\n\t\t\t\t"+t._s(t.t("settings","Enforce expiration date"))+"\n\t\t\t")]),t._v(" "),n("NcTextField",{staticClass:"sharing__input",attrs:{type:"number",label:t.t("settings","Default expiration time of new shares in days"),placeholder:t.t("settings","Expire shares after x days"),value:t.settings.internalExpireAfterNDays},on:{"update:value":function(n){return t.$set(t.settings,"internalExpireAfterNDays",n)}}})],1),t._v(" "),n("NcCheckboxRadioSwitch",{attrs:{type:"switch","aria-controls":"settings-sharing-remote-api-expiration",checked:t.settings.defaultRemoteExpireDate},on:{"update:checked":function(n){return t.$set(t.settings,"defaultRemoteExpireDate",n)}}},[t._v("\n\t\t\t"+t._s(t.t("settings","Set default expiration date for shares to other servers"))+"\n\t\t")]),t._v(" "),n("fieldset",{directives:[{name:"show",rawName:"v-show",value:t.settings.defaultRemoteExpireDate,expression:"settings.defaultRemoteExpireDate"}],staticClass:"sharing__sub-section",attrs:{id:"settings-sharing-remote-api-expiration"}},[n("NcCheckboxRadioSwitch",{attrs:{checked:t.settings.enforceRemoteExpireDate},on:{"update:checked":function(n){return t.$set(t.settings,"enforceRemoteExpireDate",n)}}},[t._v("\n\t\t\t\t"+t._s(t.t("settings","Enforce expiration date for remote shares"))+"\n\t\t\t")]),t._v(" "),n("NcTextField",{staticClass:"sharing__input",attrs:{type:"number",label:t.t("settings","Default expiration time of remote shares in days"),placeholder:t.t("settings","Expire remote shares after x days"),value:t.settings.remoteExpireAfterNDays},on:{"update:value":function(n){return t.$set(t.settings,"remoteExpireAfterNDays",n)}}})],1),t._v(" "),n("NcCheckboxRadioSwitch",{attrs:{type:"switch","aria-controls":"settings-sharing-api-api-expiration",checked:t.settings.defaultExpireDate,disabled:!t.settings.allowLinks},on:{"update:checked":function(n){return t.$set(t.settings,"defaultExpireDate",n)}}},[t._v("\n\t\t\t"+t._s(t.t("settings","Set default expiration date for shares via link or mail"))+"\n\t\t")]),t._v(" "),n("fieldset",{directives:[{name:"show",rawName:"v-show",value:t.settings.allowLinks&&t.settings.defaultExpireDate,expression:"settings.allowLinks && settings.defaultExpireDate"}],staticClass:"sharing__sub-section",attrs:{id:"settings-sharing-api-api-expiration"}},[n("NcCheckboxRadioSwitch",{attrs:{checked:t.settings.enforceExpireDate},on:{"update:checked":function(n){return t.$set(t.settings,"enforceExpireDate",n)}}},[t._v("\n\t\t\t\t"+t._s(t.t("settings","Enforce expiration date for remote shares"))+"\n\t\t\t")]),t._v(" "),n("NcTextField",{staticClass:"sharing__input",attrs:{type:"number",label:t.t("settings","Default expiration time of shares in days"),placeholder:t.t("settings","Expire shares after x days"),value:t.settings.expireAfterNDays},on:{"update:value":function(n){return t.$set(t.settings,"expireAfterNDays",n)}}})],1)],1),t._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:t.settings.enabled,expression:"settings.enabled"}],staticClass:"sharing__section",attrs:{id:"settings-sharing-privary-related"}},[n("h3",[t._v(t._s(t.t("settings","Privacy settings for sharing")))]),t._v(" "),n("NcCheckboxRadioSwitch",{attrs:{type:"switch","aria-controls":"settings-sharing-privacy-user-enumeration",checked:t.settings.allowShareDialogUserEnumeration},on:{"update:checked":function(n){return t.$set(t.settings,"allowShareDialogUserEnumeration",n)}}},[t._v("\n\t\t\t"+t._s(t.t("settings","Allow username autocompletion in share dialog and allow access to the system address book"))+"\n\t\t")]),t._v(" "),n("fieldset",{directives:[{name:"show",rawName:"v-show",value:t.settings.allowShareDialogUserEnumeration,expression:"settings.allowShareDialogUserEnumeration"}],staticClass:"sharing__sub-section",attrs:{id:"settings-sharing-privacy-user-enumeration"}},[n("em",[t._v("\n\t\t\t\t"+t._s(t.t("settings",'If autocompletion "same group" and "phone number integration" are enabled a match in either is enough to show the user.'))+"\n\t\t\t")]),t._v(" "),n("NcCheckboxRadioSwitch",{attrs:{checked:t.settings.restrictUserEnumerationToGroup},on:{"update:checked":function(n){return t.$set(t.settings,"restrictUserEnumerationToGroup",n)}}},[t._v("\n\t\t\t\t"+t._s(t.t("settings","Allow username autocompletion to users within the same groups and limit system address books to users in the same groups"))+"\n\t\t\t")]),t._v(" "),n("NcCheckboxRadioSwitch",{attrs:{checked:t.settings.restrictUserEnumerationToPhone},on:{"update:checked":function(n){return t.$set(t.settings,"restrictUserEnumerationToPhone",n)}}},[t._v("\n\t\t\t\t"+t._s(t.t("settings","Allow username autocompletion to users based on phone number integration"))+"\n\t\t\t")])],1),t._v(" "),n("NcCheckboxRadioSwitch",{attrs:{type:"switch",checked:t.settings.restrictUserEnumerationFullMatch},on:{"update:checked":function(n){return t.$set(t.settings,"restrictUserEnumerationFullMatch",n)}}},[t._v("\n\t\t\t"+t._s(t.t("settings","Allow autocompletion when entering the full name or email address (ignoring missing phonebook match and being in the same group)"))+"\n\t\t")]),t._v(" "),n("NcCheckboxRadioSwitch",{attrs:{type:"switch",checked:t.publicShareDisclaimerEnabled},on:{"update:checked":function(n){t.publicShareDisclaimerEnabled=n}}},[t._v("\n\t\t\t"+t._s(t.t("settings","Show disclaimer text on the public link upload page (only shown when the file list is hidden)"))+"\n\t\t")]),t._v(" "),"string"==typeof t.settings.publicShareDisclaimerText?n("div",{staticClass:"sharing__sub-section",attrs:{"aria-describedby":"settings-sharing-privary-related-disclaimer-hint"}},[n("NcTextArea",{staticClass:"sharing__input",attrs:{label:t.t("settings","Disclaimer text"),"aria-describedby":"settings-sharing-privary-related-disclaimer-hint",value:t.settings.publicShareDisclaimerText},on:{"update:value":t.onUpdateDisclaimer}}),t._v(" "),n("em",{staticClass:"sharing__input",attrs:{id:"settings-sharing-privary-related-disclaimer-hint"}},[t._v("\n\t\t\t\t"+t._s(t.t("settings","This text will be shown on the public link upload page when the file list is hidden."))+"\n\t\t\t")])],1):t._e()],1),t._v(" "),n("div",{staticClass:"sharing__section",attrs:{id:"settings-sharing-default-permissions"}},[n("h3",[t._v(t._s(t.t("settings","Default share permissions")))]),t._v(" "),n("SelectSharingPermissions",{attrs:{value:t.settings.defaultPermissions},on:{"update:value":function(n){return t.$set(t.settings,"defaultPermissions",n)}}})],1)],1)}),[],!1,null,"7ddf2b78",null).exports,Z=(0,r.defineComponent)({name:"AdminSettingsSharing",components:{AdminSettingsSharingForm:D,NcNoteCard:i.qf,NcSettingsSection:i.gE},data:()=>({documentationLink:(0,u.j)("settings","sharingDocumentation",""),sharingAppEnabled:(0,u.j)("settings","sharingAppEnabled",!1)}),methods:{t:o.Iu}}),j=(0,A.Z)(Z,(function(){var t=this,n=t._self._c;return t._self._setupProxy,n("NcSettingsSection",{attrs:{"data-cy-settings-sharing-section":"","limit-width":!0,"doc-url":t.documentationLink,name:t.t("settings","Sharing"),description:t.t("settings","As admin you can fine-tune the sharing behavior. Please see the documentation for more information.")}},[t.sharingAppEnabled?n("AdminSettingsSharingForm"):n("NcNoteCard",{attrs:{type:"warning"}},[t._v("\n\t\t"+t._s(t.t("settings","You need to enable the File sharing App."))+"\n\t")])],1)}),[],!1,null,null,null).exports;new r.default({name:"AdminSettingsSharingSection",el:"#vue-admin-settings-sharing",render:t=>t(j)})},47236:(t,n,e)=>{"use strict";e.d(n,{Z:()=>a});var r=e(87537),i=e.n(r),u=e(23645),o=e.n(u)()(i());o.push([t.id,".sharing[data-v-7ddf2b78]{display:flex;flex-direction:column;gap:12px}.sharing__labeled-entry[data-v-7ddf2b78]{display:flex;flex:1 0;flex-direction:column;gap:4px}.sharing__section[data-v-7ddf2b78]{display:flex;flex-direction:column;gap:4px;margin-block-end:12px}.sharing__sub-section[data-v-7ddf2b78]{display:flex;flex-direction:column;gap:4px;margin-inline-start:44px;margin-block-end:12px}.sharing__input[data-v-7ddf2b78]{max-width:500px;margin-inline-start:14px}.sharing__input[data-v-7ddf2b78] .v-select.select{width:100%}@media only screen and (max-width: 350px){.sharing__sub-section[data-v-7ddf2b78]{margin-inline-start:14px}}","",{version:3,sources:["webpack://./apps/settings/src/components/AdminSettingsSharingForm.vue"],names:[],mappings:"AACA,0BACC,YAAA,CACA,qBAAA,CACA,QAAA,CAEA,yCACC,YAAA,CACA,QAAA,CACA,qBAAA,CACA,OAAA,CAGD,mCACC,YAAA,CACA,qBAAA,CACA,OAAA,CACA,qBAAA,CAGD,uCACC,YAAA,CACA,qBAAA,CACA,OAAA,CAEA,wBAAA,CACA,qBAAA,CAGD,iCACC,eAAA,CAEA,wBAAA,CAEA,kDACC,UAAA,CAKH,0CAGE,uCACC,wBAAA,CAAA",sourcesContent:["\n.sharing {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 12px;\n\n\t&__labeled-entry {\n\t\tdisplay: flex;\n\t\tflex: 1 0;\n\t\tflex-direction: column;\n\t\tgap: 4px;\n\t}\n\n\t&__section {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tgap: 4px;\n\t\tmargin-block-end: 12px\n\t}\n\n\t&__sub-section {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tgap: 4px;\n\n\t\tmargin-inline-start: 44px;\n\t\tmargin-block-end: 12px\n\t}\n\n\t&__input {\n\t\tmax-width: 500px;\n\t\t// align with checkboxes\n\t\tmargin-inline-start: 14px;\n\n\t\t:deep(.v-select.select) {\n\t\t\twidth: 100%;\n\t\t}\n\t}\n}\n\n@media only screen and (max-width: 350px) {\n\t// ensure no overflow happens on small devices (required for WCAG)\n\t.sharing {\n\t\t&__sub-section {\n\t\t\tmargin-inline-start: 14px;\n\t\t}\n\t}\n}\n"],sourceRoot:""}]);const a=o},76865:(t,n,e)=>{"use strict";e.d(n,{Z:()=>a});var r=e(87537),i=e.n(r),u=e(23645),o=e.n(u)()(i());o.push([t.id,"\n.permissions-select[data-v-54c0ce93] {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\tgap: 4px;\n}\n","",{version:3,sources:["webpack://./apps/settings/src/components/SelectSharingPermissions.vue"],names:[],mappings:";AA8FA;CACA,aAAA;CACA,eAAA;CACA,QAAA;AACA",sourcesContent:["\x3c!--\n\t- @copyright 2023 Ferdinand Thiessen \n\t-\n\t- @author Ferdinand Thiessen \n\t-\n\t- @license AGPL-3.0-or-later\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 .\n\t-\n--\x3e\n\n\n