Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/api-CQ0gM7Uk.chunk.mjs → dist/api-DntTCVXB.chunk.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import{c as u}from"./index-BCebL___.chunk.mjs";import{g as y,e as c}from"./index-Bndk0DrU.chunk.mjs";import{t as o}from"./translation-DoG5ZELJ-XUrtIRvk.chunk.mjs";import{c as f}from"./index-DxnK_Coe.chunk.mjs";import{b as h}from"./createElementId-DhjFt1I9-Bh_4C_f2.chunk.mjs";import{g as b}from"./dav-CL9HtPMq.chunk.mjs";const r=y().setApp("systemtags").detectUser().build(),V={userVisible:!0,userAssignable:!0,canAssign:!0},x=Object.freeze({"display-name":"displayName","user-visible":"userVisible","user-assignable":"userAssignable","can-assign":"canAssign"});function p(t){return t.map(({props:s})=>Object.fromEntries(Object.entries(s).map(([e,a])=>(e=x[e]??e,a=e==="displayName"?String(a):a,[e,a]))))}function w(t){const s=t.indexOf("?");s>0&&(t=t.substring(0,s));const e=t.split("/");let a;do a=e[e.length-1],e.pop();while(!a&&e.length>0);return Number(a)}function v(t){if("name"in t&&!("displayName"in t))return{...t};const s={...t};return s.name=s.displayName,delete s.displayName,s}function N(t){const s=t.attributes?.["system-tags"]?.["system-tag"];return s===void 0?[]:[s].flat().map(e=>typeof e=="string"?e:e.text)}function P(t,s){t.attributes["system-tags"]={"system-tag":s},c("files:node:updated",t)}const n=b(),l=`<?xml version="1.0"?>
import{c as u}from"./index-BCebL___.chunk.mjs";import{g as y,e as c}from"./index-Bndk0DrU.chunk.mjs";import{t as o}from"./translation-DoG5ZELJ-XUrtIRvk.chunk.mjs";import{c as f}from"./index-B8CmRwk1.chunk.mjs";import{b as h}from"./createElementId-DhjFt1I9-Bh_4C_f2.chunk.mjs";import{g as b}from"./dav-CL9HtPMq.chunk.mjs";const r=y().setApp("systemtags").detectUser().build(),V={userVisible:!0,userAssignable:!0,canAssign:!0},x=Object.freeze({"display-name":"displayName","user-visible":"userVisible","user-assignable":"userAssignable","can-assign":"canAssign"});function p(t){return t.map(({props:s})=>Object.fromEntries(Object.entries(s).map(([e,a])=>(e=x[e]??e,a=e==="displayName"?String(a):a,[e,a]))))}function w(t){const s=t.indexOf("?");s>0&&(t=t.substring(0,s));const e=t.split("/");let a;do a=e[e.length-1],e.pop();while(!a&&e.length>0);return Number(a)}function v(t){if("name"in t&&!("displayName"in t))return{...t};const s={...t};return s.name=s.displayName,delete s.displayName,s}function N(t){const s=t.attributes?.["system-tags"]?.["system-tag"];return s===void 0?[]:[s].flat().map(e=>typeof e=="string"?e:e.text)}function P(t,s){t.attributes["system-tags"]={"system-tag":s},c("files:node:updated",t)}const n=b(),l=`<?xml version="1.0"?>
<d:propfind xmlns:d="DAV:" xmlns:oc="http://owncloud.org/ns" xmlns:nc="http://nextcloud.org/ns">
<d:prop>
<oc:id />
Expand Down Expand Up @@ -40,4 +40,4 @@ import{c as u}from"./index-BCebL___.chunk.mjs";import{g as y,e as c}from"./index
</d:prop>
</d:remove>
</d:propertyupdate>`),await n.customRequest(i,{method:"PROPPATCH",data:d,headers:{"if-match":a}})}async function H(t){const s=t?"1":"0",e=h("/apps/provisioning_api/api/v1/config/apps/{appId}/{key}",{appId:"systemtags",key:"restrict_creation_to_admin"});await f();const{data:a}=await u.post(e,{value:s});return a}export{_ as a,H as b,R as c,V as d,N as e,D as f,q as g,P as h,C as i,r as l,k as s,T as u};
//# sourceMappingURL=api-CQ0gM7Uk.chunk.mjs.map
//# sourceMappingURL=api-DntTCVXB.chunk.mjs.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/federatedfilesharing-settings-admin.mjs
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
import{l as s,a as A}from"./index-Ma7sfat2.chunk.mjs";import{f as U,o as g,g as c,w as i,h as f,u as a,j as p,t as l,e as m,b as h,L as G,k as T}from"./runtime-dom.esm-bundler-DPEdZePn.chunk.mjs";import{c as x}from"./index-BCebL___.chunk.mjs";import{a as v,e as b}from"./index-C1xmmKTZ-CGpLs37u.chunk.mjs";import{t as e}from"./translation-DoG5ZELJ-XUrtIRvk.chunk.mjs";import{c as C}from"./index-DxnK_Coe.chunk.mjs";import{b as D}from"./createElementId-DhjFt1I9-Bh_4C_f2.chunk.mjs";import{N as u}from"./NcCheckboxRadioSwitch-BMsPx74L-fxtySBP5.chunk.mjs";import{N as j}from"./ContentCopy-DcIrS3JP.chunk.mjs";import{l as S}from"./logger-Z3HfytLa.chunk.mjs";import"./modulepreload-polyfill-BxzAKjcf.chunk.mjs";import"./index-Bndk0DrU.chunk.mjs";import"./index-sH3U_332.chunk.mjs";import"./index-CKn3f84a.chunk.mjs";import"./NcModal-DHryP_87-Cy2jN0l1.chunk.mjs";import"./autolink-U5pBzLgI-Bpd-_ISJ.chunk.mjs";import"./Web-BMpaLM07.chunk.mjs";import"./mdi-Cgau7A4L.chunk.mjs";import"./NcPasswordField-uaMO2pdt-Y_frnjqT.chunk.mjs";import"./NcInputField-o5OFv3z6-CZbWqg6Y.chunk.mjs";const I={class:"settings-subsection"},q={class:"settings-subsection__name"},F=U({__name:"AdminSettings",setup(W){const E=s("federatedfilesharing","sharingFederatedDocUrl"),y=new Proxy({outgoingServer2serverShareEnabled:[s("federatedfilesharing","outgoingServer2serverShareEnabled"),"outgoing_server2server_share_enabled"],incomingServer2serverShareEnabled:[s("federatedfilesharing","incomingServer2serverShareEnabled"),"incoming_server2server_share_enabled"],outgoingServer2serverGroupShareEnabled:[s("federatedfilesharing","outgoingServer2serverGroupShareEnabled"),"outgoing_server2server_group_share_enabled"],incomingServer2serverGroupShareEnabled:[s("federatedfilesharing","incomingServer2serverGroupShareEnabled"),"incoming_server2server_group_share_enabled"],federatedGroupSharingSupported:[s("federatedfilesharing","federatedGroupSharingSupported"),"federated_group_sharing_supported"],federatedTrustedShareAutoAccept:[s("federatedfilesharing","federatedTrustedShareAutoAccept"),"federatedTrustedShareAutoAccept"],lookupServerEnabled:[s("federatedfilesharing","lookupServerEnabled"),"lookupServerEnabled"],lookupServerUploadEnabled:[s("federatedfilesharing","lookupServerUploadEnabled"),"lookupServerUploadEnabled"]},{get(d,o){return d[o]?.[0]},set(d,o,t){return o in d?(d[o][0]=t,k(d[o][1],t),!0):!1}}),r=G(y);async function _(d){if(d===!1)return r.lookupServerUploadEnabled=!1;await b({name:e("federatedfilesharing","Confirm data upload to lookup server"),text:e("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.'),labelConfirm:e("federatedfilesharing","Enable data upload"),labelReject:e("federatedfilesharing","Disable upload"),severity:"warning"}).then(()=>{r.lookupServerUploadEnabled=!0}).catch(()=>{r.lookupServerUploadEnabled=!1})}async function w(d){if(d===!1)return r.lookupServerEnabled=!1;await b({name:e("federatedfilesharing","Confirm querying lookup server"),text:e("federatedfilesharing","When enabled, the search input when creating shares will be sent to an external system that provides a public and global address book.")+e("federatedfilesharing","This is used to retrieve the federated cloud ID to make federated sharing easier.")+e("federatedfilesharing","Moreover, email addresses of users might be sent to that system in order to verify them."),labelConfirm:e("federatedfilesharing","Enable querying"),labelReject:e("federatedfilesharing","Disable querying"),severity:"warning"}).then(()=>{r.lookupServerEnabled=!0}).catch(()=>{r.lookupServerEnabled=!1})}async function k(d,o){await C();const t=D("/apps/provisioning_api/api/v1/config/apps/{appId}/{key}",{appId:"files_sharing",key:d}),V=o?"yes":"no";try{const{data:n}=await x.post(t,{value:V});if(n.ocs.meta.status!=="ok")if(n.ocs.meta.message)v(n.ocs.meta.message),S.error("Error updating federated files sharing config",{error:n.ocs});else throw new Error(`Failed to update federatedfilesharing config, ${n.ocs.meta.statuscode}`)}catch(n){S.error("Error updating federated files sharing config",{error:n}),v(e("federatedfilesharing","Unable to update federated files sharing config"))}}return(d,o)=>(g(),c(a(j),{name:a(e)("federatedfilesharing","Federated Cloud Sharing"),description:a(e)("federatedfilesharing","Adjust how people can share between servers. This includes shares between people on this server as well if they are using federated sharing."),docUrl:a(E)},{default:i(()=>[f(a(u),{modelValue:r.outgoingServer2serverShareEnabled,"onUpdate:modelValue":o[0]||(o[0]=t=>r.outgoingServer2serverShareEnabled=t),type:"switch"},{default:i(()=>[p(l(a(e)("federatedfilesharing","Allow people on this server to send shares to other servers (this option also allows WebDAV access to public shares)")),1)]),_:1},8,["modelValue"]),f(a(u),{modelValue:r.incomingServer2serverShareEnabled,"onUpdate:modelValue":o[1]||(o[1]=t=>r.incomingServer2serverShareEnabled=t),type:"switch"},{default:i(()=>[p(l(a(e)("federatedfilesharing","Allow people on this server to receive shares from other servers")),1)]),_:1},8,["modelValue"]),r.federatedGroupSharingSupported?(g(),c(a(u),{key:0,modelValue:r.outgoingServer2serverGroupShareEnabled,"onUpdate:modelValue":o[2]||(o[2]=t=>r.outgoingServer2serverGroupShareEnabled=t),type:"switch"},{default:i(()=>[p(l(a(e)("federatedfilesharing","Allow people on this server to send shares to groups on other servers")),1)]),_:1},8,["modelValue"])):m("",!0),r.federatedGroupSharingSupported?(g(),c(a(u),{key:1,modelValue:r.incomingServer2serverGroupShareEnabled,"onUpdate:modelValue":o[3]||(o[3]=t=>r.incomingServer2serverGroupShareEnabled=t),type:"switch"},{default:i(()=>[p(l(a(e)("federatedfilesharing","Allow people on this server to receive group shares from other servers")),1)]),_:1},8,["modelValue"])):m("",!0),h("fieldset",null,[h("legend",null,l(a(e)("federatedfilesharing","The lookup server is only available for global scale.")),1),f(a(u),{type:"switch",modelValue:r.lookupServerEnabled,disabled:"","onUpdate:modelValue":w},{default:i(()=>[p(l(a(e)("federatedfilesharing","Search global and public address book for people")),1)]),_:1},8,["modelValue"]),f(a(u),{type:"switch",modelValue:r.lookupServerUploadEnabled,disabled:"","onUpdate:modelValue":_},{default:i(()=>[p(l(a(e)("federatedfilesharing","Allow people to publish their data to a global and public address book")),1)]),_:1},8,["modelValue"])]),h("div",I,[h("h3",q,l(a(e)("federatedfilesharing","Trusted federation")),1),f(a(u),{modelValue:r.federatedTrustedShareAutoAccept,"onUpdate:modelValue":o[4]||(o[4]=t=>r.federatedTrustedShareAutoAccept=t),type:"switch"},{default:i(()=>[p(l(a(e)("federatedfilesharing","Automatically accept shares from trusted federated accounts and groups by default")),1)]),_:1},8,["modelValue"])])]),_:1},8,["name","description","docUrl"]))}}),N=A(F,[["__scopeId","data-v-71370f43"]]),R=s("federatedfilesharing","internalOnly",!1);R||T(N).mount("#vue-admin-federated");
import{l as s,a as A}from"./index-Ma7sfat2.chunk.mjs";import{f as U,o as g,g as c,w as i,h as f,u as a,j as p,t as l,e as m,b as h,L as G,k as T}from"./runtime-dom.esm-bundler-DPEdZePn.chunk.mjs";import{c as x}from"./index-BCebL___.chunk.mjs";import{a as v,e as b}from"./index-C1xmmKTZ-CGpLs37u.chunk.mjs";import{t as e}from"./translation-DoG5ZELJ-XUrtIRvk.chunk.mjs";import{c as C}from"./index-B8CmRwk1.chunk.mjs";import{b as D}from"./createElementId-DhjFt1I9-Bh_4C_f2.chunk.mjs";import{N as u}from"./NcCheckboxRadioSwitch-BMsPx74L-fxtySBP5.chunk.mjs";import{N as j}from"./ContentCopy-DcIrS3JP.chunk.mjs";import{l as S}from"./logger-Z3HfytLa.chunk.mjs";import"./modulepreload-polyfill-BxzAKjcf.chunk.mjs";import"./index-Bndk0DrU.chunk.mjs";import"./index-sH3U_332.chunk.mjs";import"./index-CKn3f84a.chunk.mjs";import"./NcModal-DHryP_87-Cy2jN0l1.chunk.mjs";import"./autolink-U5pBzLgI-Bpd-_ISJ.chunk.mjs";import"./Web-BMpaLM07.chunk.mjs";import"./mdi-Cgau7A4L.chunk.mjs";import"./NcPasswordField-uaMO2pdt-Y_frnjqT.chunk.mjs";import"./NcInputField-o5OFv3z6-CZbWqg6Y.chunk.mjs";const I={class:"settings-subsection"},q={class:"settings-subsection__name"},F=U({__name:"AdminSettings",setup(W){const E=s("federatedfilesharing","sharingFederatedDocUrl"),y=new Proxy({outgoingServer2serverShareEnabled:[s("federatedfilesharing","outgoingServer2serverShareEnabled"),"outgoing_server2server_share_enabled"],incomingServer2serverShareEnabled:[s("federatedfilesharing","incomingServer2serverShareEnabled"),"incoming_server2server_share_enabled"],outgoingServer2serverGroupShareEnabled:[s("federatedfilesharing","outgoingServer2serverGroupShareEnabled"),"outgoing_server2server_group_share_enabled"],incomingServer2serverGroupShareEnabled:[s("federatedfilesharing","incomingServer2serverGroupShareEnabled"),"incoming_server2server_group_share_enabled"],federatedGroupSharingSupported:[s("federatedfilesharing","federatedGroupSharingSupported"),"federated_group_sharing_supported"],federatedTrustedShareAutoAccept:[s("federatedfilesharing","federatedTrustedShareAutoAccept"),"federatedTrustedShareAutoAccept"],lookupServerEnabled:[s("federatedfilesharing","lookupServerEnabled"),"lookupServerEnabled"],lookupServerUploadEnabled:[s("federatedfilesharing","lookupServerUploadEnabled"),"lookupServerUploadEnabled"]},{get(d,o){return d[o]?.[0]},set(d,o,t){return o in d?(d[o][0]=t,k(d[o][1],t),!0):!1}}),r=G(y);async function _(d){if(d===!1)return r.lookupServerUploadEnabled=!1;await b({name:e("federatedfilesharing","Confirm data upload to lookup server"),text:e("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.'),labelConfirm:e("federatedfilesharing","Enable data upload"),labelReject:e("federatedfilesharing","Disable upload"),severity:"warning"}).then(()=>{r.lookupServerUploadEnabled=!0}).catch(()=>{r.lookupServerUploadEnabled=!1})}async function w(d){if(d===!1)return r.lookupServerEnabled=!1;await b({name:e("federatedfilesharing","Confirm querying lookup server"),text:e("federatedfilesharing","When enabled, the search input when creating shares will be sent to an external system that provides a public and global address book.")+e("federatedfilesharing","This is used to retrieve the federated cloud ID to make federated sharing easier.")+e("federatedfilesharing","Moreover, email addresses of users might be sent to that system in order to verify them."),labelConfirm:e("federatedfilesharing","Enable querying"),labelReject:e("federatedfilesharing","Disable querying"),severity:"warning"}).then(()=>{r.lookupServerEnabled=!0}).catch(()=>{r.lookupServerEnabled=!1})}async function k(d,o){await C();const t=D("/apps/provisioning_api/api/v1/config/apps/{appId}/{key}",{appId:"files_sharing",key:d}),V=o?"yes":"no";try{const{data:n}=await x.post(t,{value:V});if(n.ocs.meta.status!=="ok")if(n.ocs.meta.message)v(n.ocs.meta.message),S.error("Error updating federated files sharing config",{error:n.ocs});else throw new Error(`Failed to update federatedfilesharing config, ${n.ocs.meta.statuscode}`)}catch(n){S.error("Error updating federated files sharing config",{error:n}),v(e("federatedfilesharing","Unable to update federated files sharing config"))}}return(d,o)=>(g(),c(a(j),{name:a(e)("federatedfilesharing","Federated Cloud Sharing"),description:a(e)("federatedfilesharing","Adjust how people can share between servers. This includes shares between people on this server as well if they are using federated sharing."),docUrl:a(E)},{default:i(()=>[f(a(u),{modelValue:r.outgoingServer2serverShareEnabled,"onUpdate:modelValue":o[0]||(o[0]=t=>r.outgoingServer2serverShareEnabled=t),type:"switch"},{default:i(()=>[p(l(a(e)("federatedfilesharing","Allow people on this server to send shares to other servers (this option also allows WebDAV access to public shares)")),1)]),_:1},8,["modelValue"]),f(a(u),{modelValue:r.incomingServer2serverShareEnabled,"onUpdate:modelValue":o[1]||(o[1]=t=>r.incomingServer2serverShareEnabled=t),type:"switch"},{default:i(()=>[p(l(a(e)("federatedfilesharing","Allow people on this server to receive shares from other servers")),1)]),_:1},8,["modelValue"]),r.federatedGroupSharingSupported?(g(),c(a(u),{key:0,modelValue:r.outgoingServer2serverGroupShareEnabled,"onUpdate:modelValue":o[2]||(o[2]=t=>r.outgoingServer2serverGroupShareEnabled=t),type:"switch"},{default:i(()=>[p(l(a(e)("federatedfilesharing","Allow people on this server to send shares to groups on other servers")),1)]),_:1},8,["modelValue"])):m("",!0),r.federatedGroupSharingSupported?(g(),c(a(u),{key:1,modelValue:r.incomingServer2serverGroupShareEnabled,"onUpdate:modelValue":o[3]||(o[3]=t=>r.incomingServer2serverGroupShareEnabled=t),type:"switch"},{default:i(()=>[p(l(a(e)("federatedfilesharing","Allow people on this server to receive group shares from other servers")),1)]),_:1},8,["modelValue"])):m("",!0),h("fieldset",null,[h("legend",null,l(a(e)("federatedfilesharing","The lookup server is only available for global scale.")),1),f(a(u),{type:"switch",modelValue:r.lookupServerEnabled,disabled:"","onUpdate:modelValue":w},{default:i(()=>[p(l(a(e)("federatedfilesharing","Search global and public address book for people")),1)]),_:1},8,["modelValue"]),f(a(u),{type:"switch",modelValue:r.lookupServerUploadEnabled,disabled:"","onUpdate:modelValue":_},{default:i(()=>[p(l(a(e)("federatedfilesharing","Allow people to publish their data to a global and public address book")),1)]),_:1},8,["modelValue"])]),h("div",I,[h("h3",q,l(a(e)("federatedfilesharing","Trusted federation")),1),f(a(u),{modelValue:r.federatedTrustedShareAutoAccept,"onUpdate:modelValue":o[4]||(o[4]=t=>r.federatedTrustedShareAutoAccept=t),type:"switch"},{default:i(()=>[p(l(a(e)("federatedfilesharing","Automatically accept shares from trusted federated accounts and groups by default")),1)]),_:1},8,["modelValue"])])]),_:1},8,["name","description","docUrl"]))}}),N=A(F,[["__scopeId","data-v-71370f43"]]),R=s("federatedfilesharing","internalOnly",!1);R||T(N).mount("#vue-admin-federated");
//# sourceMappingURL=federatedfilesharing-settings-admin.mjs.map
Loading
Loading