/*! For license information please see settings-vue-settings-admin-sharing.js.LICENSE.txt */ (()=>{var t,n,e,r={92561:(t,n,e)=>{"use strict";var r=e(85471),i=e(76333),u=e(32981),o=e(53334),a=e(85168),s=e(2543),c=e(17334),l=e.n(c);const f=(0,r.pM)({name:"SelectSharingPermissions",components:{NcCheckboxRadioSwitch:i.AO},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!!(this.value&this.PERMISSION_CREATE)},canUpdate(){return!!(this.value&this.PERMISSION_UPDATE)},canDelete(){return!!(this.value&this.PERMISSION_DELETE)},canShare(){return!!(this.value&this.PERMISSION_SHARE)}},methods:{t:o.Tl,toggle(t){this.$emit("update:value",this.value^t)}}});var h=e(85072),p=e.n(h),g=e(97825),d=e.n(g),v=e(77659),_=e.n(v),y=e(55056),m=e.n(y),w=e(10540),b=e.n(w),A=e(41113),x=e.n(A),S=e(16222),k={};k.styleTagTransform=x(),k.setAttributes=m(),k.insert=_().bind(null,"head"),k.domAPI=d(),k.insertStyleElement=b(),p()(S.A,k),S.A&&S.A.locals&&S.A.locals;var C=e(14486);const E=(0,C.A)(f,(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 N=e(96763);const R=(0,r.pM)({name:"AdminSettingsSharingForm",components:{NcCheckboxRadioSwitch:i.AO,NcSettingsSelectGroup:i.C7,NcTextArea:i.gb,NcTextField:i.v,SelectSharingPermissions:E},data:()=>({settingsData:(0,u.C)("settings","sharingSettings")}),computed:{settings(){return N.warn("new proxy"),new Proxy(this.settingsData,{get:(t,n)=>t[n],set(t,n,e){const r="shareapi_".concat((0,s.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.Tl,onUpdateDisclaimer:l()((function(t){const n={success(){t?(0,a.Te)((0,o.Tl)("settings","Changed disclaimer text")):(0,a.Te)((0,o.Tl)("settings","Deleted disclaimer text"))},error(){(0,a.Qg)((0,o.Tl)("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)}}),I=R;var D=e(19864),O={};O.styleTagTransform=x(),O.setAttributes=m(),O.insert=_().bind(null,"head"),O.domAPI=d(),O.insertStyleElement=b(),p()(D.A,O),D.A&&D.A.locals&&D.A.locals;const T=(0,C.A)(I,(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.enforceLinksPasswordExcludedGroupsEnabled?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.enforceLinksPasswordExcludedGroups,callback:function(n){t.$set(t.settings,"enforceLinksPasswordExcludedGroups",n)},expression:"settings.enforceLinksPasswordExcludedGroups"}})],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","Restrict account name autocompletion and system address book access to users within 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","Restrict account name 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,"02446687",null).exports,P=(0,r.pM)({name:"AdminSettingsSharing",components:{AdminSettingsSharingForm:T,NcNoteCard:i.mQ,NcSettingsSection:i.rE},data:()=>({documentationLink:(0,u.C)("settings","sharingDocumentation",""),sharingAppEnabled:(0,u.C)("settings","sharingAppEnabled",!1)}),methods:{t:o.Tl}}),j=(0,C.A)(P,(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.Ay({name:"AdminSettingsSharingSection",el:"#vue-admin-settings-sharing",render:t=>t(j)})},19864:(t,n,e)=>{"use strict";e.d(n,{A:()=>a});var r=e(71354),i=e.n(r),u=e(76314),o=e.n(u)()(i());o.push([t.id,".sharing[data-v-02446687]{display:flex;flex-direction:column;gap:12px}.sharing__labeled-entry[data-v-02446687]{display:flex;flex:1 0;flex-direction:column;gap:4px}.sharing__section[data-v-02446687]{display:flex;flex-direction:column;gap:4px;margin-block-end:12px}.sharing__sub-section[data-v-02446687]{display:flex;flex-direction:column;gap:4px;margin-inline-start:44px;margin-block-end:12px}.sharing__input[data-v-02446687]{max-width:500px;margin-inline-start:14px}.sharing__input[data-v-02446687] .v-select.select{width:100%}@media only screen and (max-width: 350px){.sharing__sub-section[data-v-02446687]{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},16222:(t,n,e)=>{"use strict";e.d(n,{A:()=>a});var r=e(71354),i=e.n(r),u=e(76314),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