(()=>{"use strict";var e,r,n,a={12012:(e,r,n)=>{var a=n(85471),o=n(21777),i=n(53334),s=n(32981),d=n(85168),l=n(63814),c=n(56760),h=n(65043),u=n(32073),p=n(88837);n(51257);const f={name:"AdminSettings",components:{NcCheckboxRadioSwitch:u.A,NcSettingsSection:p.A},data:()=>({outgoingServer2serverShareEnabled:(0,s.C)("federatedfilesharing","outgoingServer2serverShareEnabled"),incomingServer2serverShareEnabled:(0,s.C)("federatedfilesharing","incomingServer2serverShareEnabled"),outgoingServer2serverGroupShareEnabled:(0,s.C)("federatedfilesharing","outgoingServer2serverGroupShareEnabled"),incomingServer2serverGroupShareEnabled:(0,s.C)("federatedfilesharing","incomingServer2serverGroupShareEnabled"),federatedGroupSharingSupported:(0,s.C)("federatedfilesharing","federatedGroupSharingSupported"),lookupServerEnabled:(0,s.C)("federatedfilesharing","lookupServerEnabled"),lookupServerUploadEnabled:(0,s.C)("federatedfilesharing","lookupServerUploadEnabled"),federatedTrustedShareAutoAccept:(0,s.C)("federatedfilesharing","federatedTrustedShareAutoAccept"),internalOnly:(0,s.C)("federatedfilesharing","internalOnly"),sharingFederatedDocUrl:(0,s.C)("federatedfilesharing","sharingFederatedDocUrl")}),methods:{setLookupServerUploadEnabled(e){e!==this.lookupServerUploadEnabled&&(this.lookupServerUploadEnabled=e,this.update("lookupServerUploadEnabled",e))},async showLookupServerUploadConfirmation(e){if(!1===e)return this.setLookupServerUploadEnabled(!1);const r=new d.ik(t("federatedfilesharing","Confirm data upload to lookup server"));await r.setSeverity(d.aR.Warning).setText(t("federatedfilesharing",'When enabled, all account properties (e.g. email address) with scope visibility set to "published", will be automatically synced and transmitted to an external system and made available in a public, global address book.')).addButton({callback:()=>this.setLookupServerUploadEnabled(!1),label:t("federatedfilesharing","Disable upload")}).addButton({callback:()=>this.setLookupServerUploadEnabled(!0),label:t("federatedfilesharing","Enable data upload"),type:"error"}).build().show()},setLookupServerEnabled(e){e!==this.lookupServerEnabled&&(this.lookupServerEnabled=e,this.update("lookupServerEnabled",e))},async showLookupServerConfirmation(e){if(!1===e)return this.setLookupServerEnabled(!1);const r=new d.ik(t("federatedfilesharing","Confirm querying lookup server"));await r.setSeverity(d.aR.Warning).setText(t("federatedfilesharing","When enabled, the search input when creating shares will be sent to an external system that provides a public and global address book.")+t("federatedfilesharing","This is used to retrieve the federated cloud ID to make federated sharing easier.")+t("federatedfilesharing","Moreover, email addresses of users might be sent to that system in order to verify them.")).addButton({callback:()=>this.setLookupServerEnabled(!1),label:t("federatedfilesharing","Disable querying")}).addButton({callback:()=>this.setLookupServerEnabled(!0),label:t("federatedfilesharing","Enable querying"),type:"error"}).build().show()},async update(e,r){await(0,c.C5)();const n=(0,l.KT)("/apps/provisioning_api/api/v1/config/apps/{appId}/{key}",{appId:"files_sharing",key:e}),a=r?"yes":"no";try{const{data:e}=await h.Ay.post(n,{value:a});this.handleResponse({status:e.ocs?.meta?.status})}catch(e){this.handleResponse({errorMessage:t("federatedfilesharing","Unable to update federated files sharing config"),error:e})}},async handleResponse(e){let{status:t,errorMessage:r,error:n}=e;"ok"!==t&&((0,d.Qg)(r),console.error(r,n))}}};var g=n(85072),v=n.n(g),b=n(97825),S=n.n(b),m=n(77659),k=n.n(m),w=n(55056),y=n.n(w),A=n(10540),E=n.n(A),C=n(41113),_=n.n(C),x=n(79877),N={};N.styleTagTransform=_(),N.setAttributes=y(),N.insert=k().bind(null,"head"),N.domAPI=S(),N.insertStyleElement=E(),v()(x.A,N),x.A&&x.A.locals&&x.A.locals;const T=(0,n(14486).A)(f,(function(){var e=this,t=e._self._c;return t("NcSettingsSection",{attrs:{name:e.t("federatedfilesharing","Federated Cloud Sharing"),description:e.t("federatedfilesharing","Adjust how people can share between servers. This includes shares between people on this server as well if they are using federated sharing."),"doc-url":e.sharingFederatedDocUrl}},[t("NcCheckboxRadioSwitch",{attrs:{type:"switch",checked:e.outgoingServer2serverShareEnabled},on:{"update:checked":[function(t){e.outgoingServer2serverShareEnabled=t},function(t){return e.update("outgoing_server2server_share_enabled",e.outgoingServer2serverShareEnabled)}]}},[e._v("\n\t\t"+e._s(e.t("federatedfilesharing","Allow people on this server to send shares to other servers (this option also allows WebDAV access to public shares)"))+"\n\t")]),e._v(" "),t("NcCheckboxRadioSwitch",{attrs:{type:"switch",checked:e.incomingServer2serverShareEnabled},on:{"update:checked":[function(t){e.incomingServer2serverShareEnabled=t},function(t){return e.update("incoming_server2server_share_enabled",e.incomingServer2serverShareEnabled)}]}},[e._v("\n\t\t"+e._s(e.t("federatedfilesharing","Allow people on this server to receive shares from other servers"))+"\n\t")]),e._v(" "),e.federatedGroupSharingSupported?t("NcCheckboxRadioSwitch",{attrs:{type:"switch",checked:e.outgoingServer2serverGroupShareEnabled},on:{"update:checked":[function(t){e.outgoingServer2serverGroupShareEnabled=t},function(t){return e.update("outgoing_server2server_group_share_enabled",e.outgoingServer2serverGroupShareEnabled)}]}},[e._v("\n\t\t"+e._s(e.t("federatedfilesharing","Allow people on this server to send shares to groups on other servers"))+"\n\t")]):e._e(),e._v(" "),e.federatedGroupSharingSupported?t("NcCheckboxRadioSwitch",{attrs:{type:"switch",checked:e.incomingServer2serverGroupShareEnabled},on:{"update:checked":[function(t){e.incomingServer2serverGroupShareEnabled=t},function(t){return e.update("incoming_server2server_group_share_enabled",e.incomingServer2serverGroupShareEnabled)}]}},[e._v("\n\t\t"+e._s(e.t("federatedfilesharing","Allow people on this server to receive group shares from other servers"))+"\n\t")]):e._e(),e._v(" "),t("fieldset",[t("legend",[e._v(e._s(e.t("federatedfilesharing","The lookup server is only available for global scale.")))]),e._v(" "),t("NcCheckboxRadioSwitch",{attrs:{type:"switch",checked:e.lookupServerEnabled,disabled:""},on:{"update:checked":e.showLookupServerConfirmation}},[e._v("\n\t\t\t"+e._s(e.t("federatedfilesharing","Search global and public address book for people"))+"\n\t\t")]),e._v(" "),t("NcCheckboxRadioSwitch",{attrs:{type:"switch",checked:e.lookupServerUploadEnabled,disabled:""},on:{"update:checked":e.showLookupServerUploadConfirmation}},[e._v("\n\t\t\t"+e._s(e.t("federatedfilesharing","Allow people to publish their data to a global and public address book"))+"\n\t\t")])],1),e._v(" "),t("div",{staticClass:"settings-subsection"},[t("h3",{staticClass:"settings-subsection__name"},[e._v("\n\t\t\t"+e._s(e.t("federatedfilesharing","Trusted federation"))+"\n\t\t")]),e._v(" "),t("NcCheckboxRadioSwitch",{attrs:{type:"switch",checked:e.federatedTrustedShareAutoAccept},on:{"update:checked":[function(t){e.federatedTrustedShareAutoAccept=t},function(t){return e.update("federatedTrustedShareAutoAccept",e.federatedTrustedShareAutoAccept)}]}},[e._v("\n\t\t\t"+e._s(e.t("federatedfilesharing","Automatically accept shares from trusted federated accounts and groups by default"))+"\n\t\t")])],1)],1)}),[],!1,null,"a795591e",null).exports;n.nc=(0,o.aV)(),a.Ay.mixin({methods:{t:i.Tl}}),(0,s.C)("federatedfilesharing","internalOnly",!1)||(new(a.Ay.extend(T))).$mount("#vue-admin-federated")},79877:(e,t,r)=>{r.d(t,{A:()=>s});var n=r(71354),a=r.n(n),o=r(76314),i=r.n(o)()(a());i.push([e.id,"\n.settings-subsection[data-v-a795591e] {\n\tmargin-top: 20px;\n}\n.settings-subsection__name[data-v-a795591e] {\n\tdisplay: inline-flex;\n\talign-items: center;\n\tjustify-content: center;\n\tfont-size: 16px;\n\tfont-weight: bold;\n\tmax-width: 900px;\n\tmargin-top: 0;\n}\n","",{version:3,sources:["webpack://./apps/federatedfilesharing/src/components/AdminSettings.vue"],names:[],mappings:";AAyMA;CACA,gBAAA;AACA;AAEA;CACA,oBAAA;CACA,mBAAA;CACA,uBAAA;CACA,eAAA;CACA,iBAAA;CACA,gBAAA;CACA,aAAA;AACA",sourcesContent:["\x3c!--\n - SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n--\x3e\n\n\n