settings-vue-settings-admin-delegation.js 6.1 KB

123
  1. /*! For license information please see settings-vue-settings-admin-delegation.js.LICENSE.txt */
  2. !function(){"use strict";var e,n={56683:function(e,n,r){var o=r(20144),i=r(36456),s=r.n(i),a=r(79753),u=r(4820),l=r(64024),c=(0,r(17499).IY)().setApp("settings").detectUser().build();function d(t,e,n,r,o,i,s){try{var a=t[i](s),u=a.value}catch(t){return void n(t)}a.done?e(u):Promise.resolve(u).then(r,o)}var p={name:"GroupSelect",components:{NcSelect: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,o){var i=e.apply(t,n);function s(t){d(i,r,o,s,a,"next",t)}function a(t){d(i,r,o,s,a,"throw",t)}s(void 0)}))})()}}},f=p,g=r(93379),v=r.n(g),h=r(7795),b=r.n(h),m=r(90569),A=r.n(m),y=r(3565),x=r.n(y),S=r(19216),w=r.n(S),C=r(44589),k=r.n(C),G=r(76560),O={};O.styleTagTransform=k(),O.setAttributes=x(),O.insert=A().bind(null,"head"),O.domAPI=b(),O.insertStyleElement=w(),v()(G.Z,O),G.Z&&G.Z.locals&&G.Z.locals;var Z=r(51900),j=(0,Z.Z)(f,(function(){var t=this;return(0,t._self._c)("NcSelect",{staticClass:"group-select",attrs:{"input-id":t.setting.id,placeholder:t.t("settings","None"),label:"displayName",options:t.availableGroups,multiple:!0,"close-on-select":!1},model:{value:t.selected,callback:function(e){t.selected=e},expression:"selected"}})}),[],!1,null,null,null).exports,_=r(13299),z=r.n(_),P=r(79954),T={name:"AdminDelegating",components:{GroupSelect:j,NcSettingsSection:z()},data:function(){return{availableSettings:(0,P.j)("settings","available-settings"),availableGroups:(0,P.j)("settings","available-groups"),authorizedGroups:(0,P.j)("settings","authorized-groups"),authorizedSettingsDocLink:(0,P.j)("settings","authorized-settings-doc-link")}}},N=r(1725),U={};U.styleTagTransform=k(),U.setAttributes=x(),U.insert=A().bind(null,"head"),U.domAPI=b(),U.insertStyleElement=w(),v()(N.Z,U),N.Z&&N.Z.locals&&N.Z.locals;var D=(0,Z.Z)(T,(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("label",{attrs:{for:n.id}},[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,"6bbd931b",null).exports;o.ZP.prototype.OC=OC,o.ZP.prototype.t=t,(new(o.ZP.extend(D))).$mount("#admin-right-sub-granting")},1725:function(t,e,n){var r=n(87537),o=n.n(r),i=n(23645),s=n.n(i)()(o());s.push([t.id,"label[data-v-6bbd931b]{display:block;font-size:16px;margin:12px 0;color:var(--color-text-light)}","",{version:3,sources:["webpack://./apps/settings/src/components/AdminDelegating.vue"],names:[],mappings:"AACA,uBACC,aAAA,CACA,cAAA,CACA,aAAA,CACA,6BAAA",sourcesContent:["\nlabel {\n\tdisplay: block;\n\tfont-size: 16px;\n\tmargin: 12px 0;\n\tcolor: var(--color-text-light);\n}\n"],sourceRoot:""}]),e.Z=s},76560:function(t,e,n){var r=n(87537),o=n.n(r),i=n(23645),s=n.n(i)()(o());s.push([t.id,".group-select{width:100%}","",{version:3,sources:["webpack://./apps/settings/src/components/AdminDelegation/GroupSelect.vue"],names:[],mappings:"AACA,cACC,UAAA",sourcesContent:["\n.group-select {\n\twidth: 100%;\n}\n"],sourceRoot:""}]),e.Z=s}},r={};function o(t){var e=r[t];if(void 0!==e)return e.exports;var i=r[t]={id:t,loaded:!1,exports:{}};return n[t].call(i.exports,i,i.exports,o),i.loaded=!0,i.exports}o.m=n,e=[],o.O=function(t,n,r,i){if(!n){var s=1/0;for(c=0;c<e.length;c++){n=e[c][0],r=e[c][1],i=e[c][2];for(var a=!0,u=0;u<n.length;u++)(!1&i||s>=i)&&Object.keys(o.O).every((function(t){return o.O[t](n[u])}))?n.splice(u--,1):(a=!1,i<s&&(s=i));if(a){e.splice(c--,1);var l=r();void 0!==l&&(t=l)}}return t}i=i||0;for(var c=e.length;c>0&&e[c-1][2]>i;c--)e[c]=e[c-1];e[c]=[n,r,i]},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,{a:e}),e},o.d=function(t,e){for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.nmd=function(t){return t.paths=[],t.children||(t.children=[]),t},o.j=6638,function(){o.b=document.baseURI||self.location.href;var t={6638:0};o.O.j=function(e){return 0===t[e]};var e=function(e,n){var r,i,s=n[0],a=n[1],u=n[2],l=0;if(s.some((function(e){return 0!==t[e]}))){for(r in a)o.o(a,r)&&(o.m[r]=a[r]);if(u)var c=u(o)}for(e&&e(n);l<s.length;l++)i=s[l],o.o(t,i)&&t[i]&&t[i][0](),t[i]=0;return o.O(c)},n=self.webpackChunknextcloud=self.webpackChunknextcloud||[];n.forEach(e.bind(null,0)),n.push=e.bind(null,n.push.bind(n))}(),o.nc=void 0;var i=o.O(void 0,[7874],(function(){return o(56683)}));i=o.O(i)}();
  3. //# sourceMappingURL=settings-vue-settings-admin-delegation.js.map?v=46b95161831dd40900cb