1
2
3
|
/*! For license information please see settings-vue-settings-admin-delegation.js.LICENSE.txt */
!function(){"use strict";var e,n={87030:function(e,n,r){var i=r(20144),o=r(98266),s=r.n(o),a=r(79753),u=r(4820),l=r(26932),c=(0,r(17499).IY)().setApp("settings").detectUser().build();function d(t,e,n,r,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void n(t)}a.done?e(u):Promise.resolve(u).then(r,i)}var p={name:"GroupSelect",components:{NcMultiselect:s()},props:{availableGroups:{type:Array,default:function(){return[]}},setting:{type:Object,required:!0},authorizedGroups:{type:Array,required:!0}},data:function(){var t=this;return{selected:this.authorizedGroups.filter((function(e){return e.class===t.setting.class})).map((function(e){return t.availableGroups.find((function(t){return t.gid===e.group_id}))})).filter((function(t){return void 0!==t}))}},watch:{selected:function(){this.saveGroups()}},methods:{saveGroups:function(){var e,n=this;return(e=regeneratorRuntime.mark((function e(){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={newGroups:n.selected,class:n.setting.class},e.prev=1,e.next=4,u.default.post((0,a.generateUrl)("/apps/settings/")+"/settings/authorizedgroups/saveSettings",r);case 4:e.next=10;break;case 6:e.prev=6,e.t0=e.catch(1),(0,l.x2)(t("settings","Unable to modify setting")),c.error("Unable to modify setting",e.t0);case 10:case"end":return e.stop()}}),e,null,[[1,6]])})),function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function s(t){d(o,r,i,s,a,"next",t)}function a(t){d(o,r,i,s,a,"throw",t)}s(void 0)}))})()}}},f=p,g=r(93379),v=r.n(g),h=r(7795),m=r.n(h),b=r(90569),y=r.n(b),w=r(3565),A=r.n(w),S=r(19216),x=r.n(S),G=r(44589),O=r.n(G),j=r(38788),k={};k.styleTagTransform=O(),k.setAttributes=A(),k.insert=y().bind(null,"head"),k.domAPI=m(),k.insertStyleElement=x(),v()(j.Z,k),j.Z&&j.Z.locals&&j.Z.locals;var _=r(51900),C=(0,_.Z)(f,(function(){var t=this;return(0,t._self._c)("NcMultiselect",{staticClass:"group-multiselect",attrs:{placeholder:t.t("settings","None"),"track-by":"gid",label:"displayName",options:t.availableGroups,"open-direction":"bottom",multiple:!0,"allow-empty":!0},model:{value:t.selected,callback:function(e){t.selected=e},expression:"selected"}})}),[],!1,null,null,null).exports,z=r(13299),P=r.n(z),Z=r(79954),N={name:"AdminDelegating",components:{GroupSelect:C,NcSettingsSection:P()},data:function(){return{availableSettings:(0,Z.j)("settings","available-settings"),availableGroups:(0,Z.j)("settings","available-groups"),authorizedGroups:(0,Z.j)("settings","authorized-groups"),authorizedSettingsDocLink:(0,Z.j)("settings","authorized-settings-doc-link")}}},T=(0,_.Z)(N,(function(){var t=this,e=t._self._c;return e("NcSettingsSection",{attrs:{title:t.t("settings","Administration privileges"),description:t.t("settings","Here you can decide which group can access certain sections of the administration settings."),"doc-url":t.authorizedSettingsDocLink}},[e("div",{staticClass:"setting-list"},t._l(t.availableSettings,(function(n){return e("div",{key:n.class},[e("h3",[t._v(t._s(n.sectionName))]),t._v(" "),e("GroupSelect",{attrs:{"available-groups":t.availableGroups,"authorized-groups":t.authorizedGroups,setting:n}})],1)})),0)])}),[],!1,null,null,null).exports;i.ZP.prototype.OC=OC,i.ZP.prototype.t=t,(new(i.ZP.extend(T))).$mount("#admin-right-sub-granting")},38788:function(t,e,n){var r=n(87537),i=n.n(r),o=n(23645),s=n.n(o)()(i());s.push([t.id,".group-multiselect{width:100%;margin-right:0}","",{version:3,sources:["webpack://./apps/settings/src/components/AdminDelegation/GroupSelect.vue"],names:[],mappings:"AACA,mBACC,UAAA,CACA,cAAA",sourcesContent:["\n.group-multiselect {\n\twidth: 100%;\n\tmargin-right: 0;\n}\n"],sourceRoot:""}]),e.Z=s}},r={};function i(t){var e=r[t];if(void 0!==e)return e.exports;var o=r[t]={id:t,loaded:!1,exports:{}};return n[t].call(o.exports,o,o.exports,i),o.loaded=!0,o.exports}i.m=n,e=[],i.O=function(t,n,r,o){if(!n){var s=1/0;for(c=0;c<e.length;c++){n=e[c][0],r=e[c][1],o=e[c][2];for(var a=!0,u=0;u<n.length;u++)(!1&o||s>=o)&&Object.keys(i.O).every((function(t){return i.O[t](n[u])}))?n.splice(u--,1):(a=!1,o<s&&(s=o));if(a){e.splice(c--,1);var l=r();void 0!==l&&(t=l)}}return t}o=o||0;for(var c=e.length;c>0&&e[c-1][2]>o;c--)e[c]=e[c-1];e[c]=[n,r,o]},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,{a:e}),e},i.d=function(t,e){for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.nmd=function(t){return t.paths=[],t.children||(t.children=[]),t},i.j=6638,function(){i.b=document.baseURI||self.location.href;var t={6638:0};i.O.j=function(e){return 0===t[e]};var e=function(e,n){var r,o,s=n[0],a=n[1],u=n[2],l=0;if(s.some((function(e){return 0!==t[e]}))){for(r in a)i.o(a,r)&&(i.m[r]=a[r]);if(u)var c=u(i)}for(e&&e(n);l<s.length;l++)o=s[l],i.o(t,o)&&t[o]&&t[o][0](),t[o]=0;return i.O(c)},n=self.webpackChunknextcloud=self.webpackChunknextcloud||[];n.forEach(e.bind(null,0)),n.push=e.bind(null,n.push.bind(n))}(),i.nc=void 0;var o=i.O(void 0,[7874],(function(){return i(87030)}));o=i.O(o)}();
//# sourceMappingURL=settings-vue-settings-admin-delegation.js.map?v=8152ebbb7e1a474f3f29
|