@firestitch/app-acl 12.3.1 → 12.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/components/acl-entries/acl-entries.component.d.ts +2 -1
- package/app/components/acl-entry/acl-entry.component.d.ts +3 -1
- package/app/services/app-acl.service.d.ts +0 -2
- package/bundles/firestitch-app-acl.umd.js +55 -74
- package/bundles/firestitch-app-acl.umd.js.map +1 -1
- package/esm2015/app/components/acl-entries/acl-entries.component.js +42 -35
- package/esm2015/app/components/acl-entry/acl-entry.component.js +7 -7
- package/esm2015/app/components/acl-role/acl-role.component.js +4 -5
- package/esm2015/app/components/acl-roles/acl-roles.component.js +3 -3
- package/esm2015/app/services/app-acl.service.js +1 -28
- package/fesm2015/firestitch-app-acl.js +50 -69
- package/fesm2015/firestitch-app-acl.js.map +1 -1
- package/package.json +1 -1
|
@@ -17,6 +17,7 @@ export declare class FsAclEntriesComponent implements OnInit, OnDestroy {
|
|
|
17
17
|
saveAclObjectEntry: (aclObjectEntry: AclObjectEntry) => Observable<any>;
|
|
18
18
|
environmentShow: boolean;
|
|
19
19
|
environmentLabel: string;
|
|
20
|
+
environmentKey: string;
|
|
20
21
|
actions: FsListAction[];
|
|
21
22
|
aclEntriesList: FsListComponent;
|
|
22
23
|
aclEntriesConfig: FsListConfig;
|
|
@@ -28,5 +29,5 @@ export declare class FsAclEntriesComponent implements OnInit, OnDestroy {
|
|
|
28
29
|
ngOnDestroy(): void;
|
|
29
30
|
reload(): void;
|
|
30
31
|
static ɵfac: i0.ɵɵFactoryDeclaration<FsAclEntriesComponent, never>;
|
|
31
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<FsAclEntriesComponent, "fs-acl-entries", never, { "loadAclEntries": "loadAclEntries"; "loadAclRoles": "loadAclRoles"; "saveAclObjectEntry": "saveAclObjectEntry"; "environmentShow": "environmentShow"; "environmentLabel": "environmentLabel"; "actions": "actions"; }, {}, never, never>;
|
|
32
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FsAclEntriesComponent, "fs-acl-entries", never, { "loadAclEntries": "loadAclEntries"; "loadAclRoles": "loadAclRoles"; "saveAclObjectEntry": "saveAclObjectEntry"; "environmentShow": "environmentShow"; "environmentLabel": "environmentLabel"; "environmentKey": "environmentKey"; "actions": "actions"; }, {}, never, never>;
|
|
32
33
|
}
|
|
@@ -5,6 +5,7 @@ import { AclRole } from './../../interfaces/acl-role';
|
|
|
5
5
|
import { AclEntryData } from './../../interfaces/acl-entry-data';
|
|
6
6
|
import { AclObjectRole } from './../../interfaces/acl-object-role';
|
|
7
7
|
import { AclObjectEntry } from './../../interfaces/acl-object-entry';
|
|
8
|
+
import { AclEntry } from './../../interfaces/acl-entry';
|
|
8
9
|
import { FsAppAclService } from './../../services/app-acl.service';
|
|
9
10
|
import * as i0 from "@angular/core";
|
|
10
11
|
export declare class FsAclEntryComponent implements OnInit {
|
|
@@ -15,14 +16,15 @@ export declare class FsAclEntryComponent implements OnInit {
|
|
|
15
16
|
aclRoles: AclRole[];
|
|
16
17
|
aclObjectEntry: AclObjectEntry;
|
|
17
18
|
aclObjectRole: AclObjectRole;
|
|
19
|
+
aclEntries: AclEntry[];
|
|
18
20
|
indexedAclRoleLevels: {};
|
|
19
21
|
titleEdit: string;
|
|
20
22
|
titleAdd: string;
|
|
21
23
|
required: boolean;
|
|
22
24
|
constructor(_appAclService: FsAppAclService, _dialogRef: MatDialogRef<FsAclEntryComponent>, _message: FsMessage, _data: AclEntryData);
|
|
23
|
-
save: () => import("rxjs").Subscription;
|
|
24
25
|
ngOnInit(): void;
|
|
25
26
|
aclObjectRoleChange(aclObjectRoles: AclObjectRole[]): void;
|
|
27
|
+
save: () => import("rxjs").Subscription;
|
|
26
28
|
close(data?: any): void;
|
|
27
29
|
static ɵfac: i0.ɵɵFactoryDeclaration<FsAclEntryComponent, never>;
|
|
28
30
|
static ɵcmp: i0.ɵɵComponentDeclaration<FsAclEntryComponent, "ng-component", never, {}, {}, never, never>;
|
|
@@ -11,8 +11,6 @@ export declare class FsAppAclService {
|
|
|
11
11
|
getPermissions(): ReplaySubject<AclPermission[]>;
|
|
12
12
|
getLevels(): ReplaySubject<AclLevel[]>;
|
|
13
13
|
getIndexedLevels(): import("rxjs").Observable<any>;
|
|
14
|
-
input(data: any): any;
|
|
15
|
-
output(data: any): any;
|
|
16
14
|
static ɵfac: i0.ɵɵFactoryDeclaration<FsAppAclService, never>;
|
|
17
15
|
static ɵprov: i0.ɵɵInjectableDeclaration<FsAppAclService>;
|
|
18
16
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/flex-layout'), require('@angular/material/input'), require('@angular/material/radio'), require('@angular/material/button'), require('@angular/material/select'), require('@angular/material/checkbox'), require('@angular/material/dialog'), require('@angular/core'), require('@angular/common'), require('@firestitch/list'), require('@firestitch/popover'), require('@firestitch/dialog'), require('@firestitch/form'), require('@firestitch/label'), require('@firestitch/radiogroup'), require('@firestitch/badge'), require('@firestitch/checkboxgroup'), require('rxjs/operators'), require('@firestitch/filter'), require('@firestitch/common'), require('rxjs'), require('
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@firestitch/app-acl', ['exports', '@angular/flex-layout', '@angular/material/input', '@angular/material/radio', '@angular/material/button', '@angular/material/select', '@angular/material/checkbox', '@angular/material/dialog', '@angular/core', '@angular/common', '@firestitch/list', '@firestitch/popover', '@firestitch/dialog', '@firestitch/form', '@firestitch/label', '@firestitch/radiogroup', '@firestitch/badge', '@firestitch/checkboxgroup', 'rxjs/operators', '@firestitch/filter', '@firestitch/common', 'rxjs', '
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.firestitch = global.firestitch || {}, global.firestitch["app-acl"] = {}), global.ng.flexLayout, global.ng.material.input, global.ng.material.radio, global.ng.material.button, global.ng.material.select, global.ng.material.checkbox, global.ng.material.dialog, global.ng.core, global.ng.common, global.i12, global.i2$1, global.i4, global.i15, global.i6, global.i7, global.i5$1, global.i1, global.rxjs.operators, global.filter, global.common, global.rxjs, global.
|
|
5
|
-
})(this, (function (exports, flexLayout, i18, i8, i13, i10, i9, i2, i0, i7$1, i12, i2$1, i4, i15, i6, i7, i5$1, i1, operators, filter, common, rxjs,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/flex-layout'), require('@angular/material/input'), require('@angular/material/radio'), require('@angular/material/button'), require('@angular/material/select'), require('@angular/material/checkbox'), require('@angular/material/dialog'), require('@angular/core'), require('@angular/common'), require('@firestitch/list'), require('@firestitch/popover'), require('@firestitch/dialog'), require('@firestitch/form'), require('@firestitch/label'), require('@firestitch/radiogroup'), require('@firestitch/badge'), require('@firestitch/checkboxgroup'), require('rxjs/operators'), require('@firestitch/filter'), require('@firestitch/common'), require('rxjs'), require('@firestitch/message'), require('@angular/material/form-field'), require('@angular/material/core'), require('@angular/forms'), require('@angular/flex-layout/flex'), require('lodash-es'), require('@firestitch/prompt')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@firestitch/app-acl', ['exports', '@angular/flex-layout', '@angular/material/input', '@angular/material/radio', '@angular/material/button', '@angular/material/select', '@angular/material/checkbox', '@angular/material/dialog', '@angular/core', '@angular/common', '@firestitch/list', '@firestitch/popover', '@firestitch/dialog', '@firestitch/form', '@firestitch/label', '@firestitch/radiogroup', '@firestitch/badge', '@firestitch/checkboxgroup', 'rxjs/operators', '@firestitch/filter', '@firestitch/common', 'rxjs', '@firestitch/message', '@angular/material/form-field', '@angular/material/core', '@angular/forms', '@angular/flex-layout/flex', 'lodash-es', '@firestitch/prompt'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.firestitch = global.firestitch || {}, global.firestitch["app-acl"] = {}), global.ng.flexLayout, global.ng.material.input, global.ng.material.radio, global.ng.material.button, global.ng.material.select, global.ng.material.checkbox, global.ng.material.dialog, global.ng.core, global.ng.common, global.i12, global.i2$1, global.i4, global.i15, global.i6, global.i7, global.i5$1, global.i1, global.rxjs.operators, global.filter, global.common, global.rxjs, global.i3, global.ng.material.formField, global.ng.material.core, global.ng.forms, global.ng.flexLayout.flex, global.lodashEs, global.i3$1));
|
|
5
|
+
})(this, (function (exports, flexLayout, i18, i8, i13, i10, i9, i2, i0, i7$1, i12, i2$1, i4, i15, i6, i7, i5$1, i1, operators, filter, common, rxjs, i3, i5, i11, i14, i17, lodashEs, i3$1) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopNamespace(e) {
|
|
8
8
|
if (e && e.__esModule) return e;
|
|
@@ -38,8 +38,6 @@
|
|
|
38
38
|
var i7__namespace = /*#__PURE__*/_interopNamespace(i7);
|
|
39
39
|
var i5__namespace$1 = /*#__PURE__*/_interopNamespace(i5$1);
|
|
40
40
|
var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
|
|
41
|
-
var _snakecaseKeys__namespace = /*#__PURE__*/_interopNamespace(_snakecaseKeys);
|
|
42
|
-
var _camelcaseKeys__namespace = /*#__PURE__*/_interopNamespace(_camelcaseKeys);
|
|
43
41
|
var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
|
|
44
42
|
var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
|
|
45
43
|
var i11__namespace = /*#__PURE__*/_interopNamespace(i11);
|
|
@@ -382,8 +380,6 @@
|
|
|
382
380
|
|
|
383
381
|
var FS_APP_ACL_CONFIG = new i0.InjectionToken('fs-app-acl-config');
|
|
384
382
|
|
|
385
|
-
var snakecaseKeys = _snakecaseKeys__namespace;
|
|
386
|
-
var camelcaseKeys = _camelcaseKeys__namespace;
|
|
387
383
|
var FsAppAclService = /** @class */ (function () {
|
|
388
384
|
function FsAppAclService(_appAclConfig) {
|
|
389
385
|
this._appAclConfig = _appAclConfig;
|
|
@@ -393,7 +389,6 @@
|
|
|
393
389
|
if (!this._permissions$) {
|
|
394
390
|
this._permissions$ = new rxjs.ReplaySubject();
|
|
395
391
|
this._appAclConfig.permissions
|
|
396
|
-
.pipe(operators.map(function (data) { return _this.input(data); }))
|
|
397
392
|
.subscribe(function (permissions) {
|
|
398
393
|
_this._permissions$.next(permissions);
|
|
399
394
|
_this._permissions$.complete();
|
|
@@ -406,7 +401,6 @@
|
|
|
406
401
|
if (!this._levels$) {
|
|
407
402
|
this._levels$ = new rxjs.ReplaySubject();
|
|
408
403
|
this._appAclConfig.levels
|
|
409
|
-
.pipe(operators.map(function (data) { return _this.input(data); }))
|
|
410
404
|
.subscribe(function (levels) {
|
|
411
405
|
_this._levels$.next(levels);
|
|
412
406
|
_this._levels$.complete();
|
|
@@ -420,28 +414,6 @@
|
|
|
420
414
|
return common.list(data, 'name', 'value');
|
|
421
415
|
}));
|
|
422
416
|
};
|
|
423
|
-
FsAppAclService.prototype.input = function (data) {
|
|
424
|
-
var _this = this;
|
|
425
|
-
if (lodashEs.isArray(data)) {
|
|
426
|
-
return data.map(function (item) {
|
|
427
|
-
return _this._appAclConfig.case === 'snake' ? camelcaseKeys(item, { deep: true }) : item;
|
|
428
|
-
});
|
|
429
|
-
}
|
|
430
|
-
else {
|
|
431
|
-
return this._appAclConfig.case === 'snake' ? camelcaseKeys(data, { deep: true }) : data;
|
|
432
|
-
}
|
|
433
|
-
};
|
|
434
|
-
FsAppAclService.prototype.output = function (data) {
|
|
435
|
-
var _this = this;
|
|
436
|
-
if (lodashEs.isArray(data)) {
|
|
437
|
-
return data.map(function (item) {
|
|
438
|
-
return _this._appAclConfig.case === 'snake' ? snakecaseKeys(item, { deep: true }) : item;
|
|
439
|
-
});
|
|
440
|
-
}
|
|
441
|
-
else {
|
|
442
|
-
return this._appAclConfig.case === 'snake' ? snakecaseKeys(data, { deep: true }) : data;
|
|
443
|
-
}
|
|
444
|
-
};
|
|
445
417
|
return FsAppAclService;
|
|
446
418
|
}());
|
|
447
419
|
FsAppAclService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsAppAclService, deps: [{ token: FS_APP_ACL_CONFIG }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
@@ -491,7 +463,7 @@
|
|
|
491
463
|
data: item.data,
|
|
492
464
|
};
|
|
493
465
|
}) });
|
|
494
|
-
return _this._data.saveAclRole(
|
|
466
|
+
return _this._data.saveAclRole(aclRole)
|
|
495
467
|
.pipe(operators.tap(function (response) {
|
|
496
468
|
_this._message.success('Saved Changes');
|
|
497
469
|
_this.close(response);
|
|
@@ -575,7 +547,6 @@
|
|
|
575
547
|
});
|
|
576
548
|
};
|
|
577
549
|
FsAclRoleComponent.prototype.getRole = function () {
|
|
578
|
-
var _this = this;
|
|
579
550
|
if (!this._data.aclRole.id) {
|
|
580
551
|
return rxjs.of(this._data.aclRole);
|
|
581
552
|
}
|
|
@@ -586,8 +557,7 @@
|
|
|
586
557
|
if (!this.environment) {
|
|
587
558
|
query.environmentId = null;
|
|
588
559
|
}
|
|
589
|
-
return this._data.loadAclRole(this._data.aclRole, query)
|
|
590
|
-
.pipe(operators.map(function (data) { return _this._appAclService.input(data); }));
|
|
560
|
+
return this._data.loadAclRole(this._data.aclRole, query);
|
|
591
561
|
};
|
|
592
562
|
FsAclRoleComponent.prototype.close = function (data) {
|
|
593
563
|
if (data === void 0) { data = null; }
|
|
@@ -765,7 +735,7 @@
|
|
|
765
735
|
rowActions: [
|
|
766
736
|
{
|
|
767
737
|
click: function (data) {
|
|
768
|
-
return _this.deleteAclRole(
|
|
738
|
+
return _this.deleteAclRole(data);
|
|
769
739
|
},
|
|
770
740
|
remove: {
|
|
771
741
|
title: 'Confirm',
|
|
@@ -779,7 +749,7 @@
|
|
|
779
749
|
fetch: function (query) {
|
|
780
750
|
query.permissions = true;
|
|
781
751
|
return _this.loadAclRoles(query)
|
|
782
|
-
.pipe(operators.map(function (data) { return
|
|
752
|
+
.pipe(operators.map(function (data) { return data; }));
|
|
783
753
|
},
|
|
784
754
|
};
|
|
785
755
|
};
|
|
@@ -900,12 +870,14 @@
|
|
|
900
870
|
this._message = _message;
|
|
901
871
|
this._data = _data;
|
|
902
872
|
this.aclRoles = [];
|
|
873
|
+
this.aclEntries = [];
|
|
903
874
|
this.indexedAclRoleLevels = {};
|
|
904
875
|
this.titleEdit = 'Edit Roles';
|
|
905
876
|
this.titleAdd = 'Assign Roles';
|
|
906
877
|
this.required = true;
|
|
907
878
|
this.save = function () {
|
|
908
|
-
|
|
879
|
+
var aclObjectEntry = Object.assign(Object.assign({}, _this.aclObjectEntry), { aclEntries: _this.aclEntries });
|
|
880
|
+
return _this._data.saveAclObjectEntry(aclObjectEntry)
|
|
909
881
|
.subscribe(function (data) {
|
|
910
882
|
_this._message.success('Saved Changes');
|
|
911
883
|
_this.close(data);
|
|
@@ -922,8 +894,7 @@
|
|
|
922
894
|
}
|
|
923
895
|
FsAclEntryComponent.prototype.ngOnInit = function () {
|
|
924
896
|
var _this = this;
|
|
925
|
-
rxjs.forkJoin(this._data.loadAclRoles(this.aclObjectEntry)
|
|
926
|
-
.pipe(operators.map(function (data) { return _this._appAclService.input(data); })), this._appAclService.getIndexedLevels())
|
|
897
|
+
rxjs.forkJoin(this._data.loadAclRoles(this.aclObjectEntry), this._appAclService.getIndexedLevels())
|
|
927
898
|
.subscribe(function (_b) {
|
|
928
899
|
var _c = __read(_b, 2), aclRoles = _c[0], levels = _c[1];
|
|
929
900
|
_this.aclRoles = aclRoles;
|
|
@@ -933,12 +904,12 @@
|
|
|
933
904
|
aclRoles: _this.aclObjectEntry.aclEntries
|
|
934
905
|
.map(function (aclEntry) {
|
|
935
906
|
return aclEntry.aclRole;
|
|
936
|
-
})
|
|
907
|
+
}),
|
|
937
908
|
};
|
|
938
909
|
});
|
|
939
910
|
};
|
|
940
911
|
FsAclEntryComponent.prototype.aclObjectRoleChange = function (aclObjectRoles) {
|
|
941
|
-
this.
|
|
912
|
+
this.aclEntries = aclObjectRoles.reduce(function (aclEntries, aclObjectRole) {
|
|
942
913
|
aclObjectRole.aclRoles.forEach(function (aclRole) {
|
|
943
914
|
aclEntries.push({
|
|
944
915
|
aclRoleId: aclRole.id,
|
|
@@ -978,6 +949,7 @@
|
|
|
978
949
|
this._confirm = _confirm;
|
|
979
950
|
this.environmentShow = true;
|
|
980
951
|
this.environmentLabel = 'Environment';
|
|
952
|
+
this.environmentKey = 'environment';
|
|
981
953
|
this.actions = [];
|
|
982
954
|
this.aclEntriesList = null;
|
|
983
955
|
this.aclEntriesConfig = null;
|
|
@@ -1003,7 +975,7 @@
|
|
|
1003
975
|
title: 'Remove All Roles',
|
|
1004
976
|
template: 'Are you sure you would like to remove all roles?',
|
|
1005
977
|
}).subscribe(function () {
|
|
1006
|
-
var data =
|
|
978
|
+
var data = Object.assign(Object.assign({}, aclObjectEntry), { aclEntries: [] });
|
|
1007
979
|
_this.saveAclObjectEntry(data)
|
|
1008
980
|
.subscribe(function () {
|
|
1009
981
|
_this.aclEntriesList.reload();
|
|
@@ -1020,50 +992,57 @@
|
|
|
1020
992
|
objects: true,
|
|
1021
993
|
aclRoleState: 'active',
|
|
1022
994
|
})
|
|
1023
|
-
.pipe(operators.map(function (response) { return _this._appAclService.input(response); }))
|
|
1024
995
|
.subscribe(function (aclEntries) {
|
|
1025
|
-
var objects = aclEntries
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
return items;
|
|
996
|
+
var objects = aclEntries
|
|
997
|
+
.filter(function (aclEntry) { return (!!aclEntry.object); })
|
|
998
|
+
.reduce(function (items, item) {
|
|
999
|
+
var _b;
|
|
1000
|
+
return Object.assign(Object.assign({}, items), (_b = {}, _b[item.object.id] = item.object, _b));
|
|
1030
1001
|
}, {});
|
|
1031
|
-
var environments = aclEntries
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1002
|
+
var environments = aclEntries
|
|
1003
|
+
.filter(function (aclEntry) { return (!!aclEntry[_this.environmentKey]); })
|
|
1004
|
+
.reduce(function (items, item) {
|
|
1005
|
+
var _b;
|
|
1006
|
+
var environment = item[_this.environmentKey];
|
|
1007
|
+
return Object.assign(Object.assign({}, items), (_b = {}, _b[environment.id] = environment, _b));
|
|
1036
1008
|
}, {});
|
|
1037
|
-
var
|
|
1038
|
-
|
|
1039
|
-
|
|
1009
|
+
var groupedAclEntries = lodashEs.groupBy(aclEntries, function (item) {
|
|
1010
|
+
var _a;
|
|
1011
|
+
var environmentId = (_a = (item[_this.environmentKey])) === null || _a === void 0 ? void 0 : _a.id;
|
|
1012
|
+
return [item.aclRole.level, environmentId, item.objectId];
|
|
1040
1013
|
});
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1014
|
+
var aclObjectEntries = Object.keys(groupedAclEntries)
|
|
1015
|
+
.reduce(function (accum, key) {
|
|
1016
|
+
var _b;
|
|
1017
|
+
var parts = key.split(',');
|
|
1018
|
+
return __spreadArray(__spreadArray([], __read(accum)), [
|
|
1019
|
+
(_b = {
|
|
1020
|
+
object: objects[parts[2]],
|
|
1021
|
+
level: parts[0]
|
|
1022
|
+
},
|
|
1023
|
+
_b[_this.environmentKey + "Id"] = parts[1] ? parseInt(parts[1]) : null,
|
|
1024
|
+
_b[_this.environmentKey] = environments[parts[1]],
|
|
1025
|
+
_b.aclEntries = groupedAclEntries[key],
|
|
1026
|
+
_b)
|
|
1027
|
+
]);
|
|
1028
|
+
}, []);
|
|
1029
|
+
var hasApp = aclObjectEntries.some(function (item) {
|
|
1052
1030
|
return item.aclEntries.some(function (entry) {
|
|
1053
1031
|
return !entry.objectId;
|
|
1054
1032
|
});
|
|
1055
1033
|
});
|
|
1056
1034
|
if (!hasApp) {
|
|
1057
|
-
|
|
1058
|
-
object: null,
|
|
1035
|
+
aclObjectEntries.unshift({
|
|
1036
|
+
object: null,
|
|
1037
|
+
aclEntries: [],
|
|
1059
1038
|
level: 'app',
|
|
1060
1039
|
environmentId: null,
|
|
1061
1040
|
});
|
|
1062
1041
|
}
|
|
1063
|
-
|
|
1042
|
+
aclObjectEntries = lodashEs.sortBy(aclObjectEntries, function (item) {
|
|
1064
1043
|
return item.object ? item.level : '';
|
|
1065
1044
|
});
|
|
1066
|
-
observer.next({ data:
|
|
1045
|
+
observer.next({ data: aclObjectEntries });
|
|
1067
1046
|
observer.complete();
|
|
1068
1047
|
});
|
|
1069
1048
|
});
|
|
@@ -1097,7 +1076,7 @@
|
|
|
1097
1076
|
return FsAclEntriesComponent;
|
|
1098
1077
|
}());
|
|
1099
1078
|
FsAclEntriesComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsAclEntriesComponent, deps: [{ token: FsAppAclService }, { token: i2__namespace.MatDialog }, { token: i3__namespace$1.FsPrompt }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1100
|
-
FsAclEntriesComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FsAclEntriesComponent, selector: "fs-acl-entries", inputs: { loadAclEntries: "loadAclEntries", loadAclRoles: "loadAclRoles", saveAclObjectEntry: "saveAclObjectEntry", environmentShow: "environmentShow", environmentLabel: "environmentLabel", actions: "actions" }, viewQueries: [{ propertyName: "aclEntriesList", first: true, predicate: i12.FsListComponent, descendants: true }], ngImport: i0__namespace, template: "\n<fs-list [config]=\"aclEntriesConfig\">\n <fs-list-column>\n <ng-template fs-list-header>Context</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n <div\n
|
|
1079
|
+
FsAclEntriesComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FsAclEntriesComponent, selector: "fs-acl-entries", inputs: { loadAclEntries: "loadAclEntries", loadAclRoles: "loadAclRoles", saveAclObjectEntry: "saveAclObjectEntry", environmentShow: "environmentShow", environmentLabel: "environmentLabel", environmentKey: "environmentKey", actions: "actions" }, viewQueries: [{ propertyName: "aclEntriesList", first: true, predicate: i12.FsListComponent, descendants: true }], ngImport: i0__namespace, template: "\n<fs-list [config]=\"aclEntriesConfig\">\n <fs-list-column>\n <ng-template fs-list-header>Context</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n <div\n *ngIf=\"row.object; else elseObject\"\n fxLayout=\"row\"\n fxLayoutAlign=\"start center\"\n fxLayoutGap=\"10px\">\n <fs-badge *ngIf=\"row.object.imageUrl\" shape=\"circle\" image=\"{{ row.object.imageUrl }}\"></fs-badge>\n <span>\n <div><small>{{ row.object.className }}</small></div>\n <a (click)=\"update(row)\">{{ row.object.name }}</a>\n </span>\n </div>\n\n <ng-template #elseObject>\n <a (click)=\"update(row)\">App</a>\n </ng-template>\n </ng-template>\n </fs-list-column>\n\n <fs-list-column [show]=\"environmentShow\">\n <ng-template fs-list-header>{{environmentLabel}}</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n {{row.environment?.name}}\n </ng-template>\n </fs-list-column>\n\n <fs-list-column>\n <ng-template fs-list-header>Roles</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n <div fxLayout=\"column\" fxLayoutGap=\"10px\">\n <div div *ngFor=\"let aclEntry of row.aclEntries\">\n <ng-container [ngSwitch]=\"row.level\">\n <ng-container *ngSwitchCase=\"'app'\">\n <fs-acl-role-popover [aclRole]=\"aclEntry.aclRole\" objectName=\"App\">{{aclEntry.aclRole.name}}</fs-acl-role-popover>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <ng-container *ngIf=\"row.object\">\n <fs-acl-role-popover [aclRole]=\"aclEntry.aclRole\">{{aclEntry.aclRole.name}}</fs-acl-role-popover>\n </ng-container>\n </ng-container>\n </ng-container>\n </div>\n </div>\n </ng-template>\n </fs-list-column>\n</fs-list>\n", styles: [""], components: [{ type: i12__namespace.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }, { type: i5__namespace$1.FsBadgeComponent, selector: "fs-badge", inputs: ["color", "text", "tooltip", "size", "shape", "image", "icon", "iconSize", "iconColor", "backgroundSize"] }, { type: FsAclRolePopoverComponent, selector: "fs-acl-role-popover", inputs: ["aclRole", "objectName"] }], directives: [{ type: i12__namespace.FsListColumnDirective, selector: "fs-list-column", inputs: ["show", "title", "name", "customize", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { type: i12__namespace.FsListHeaderDirective, selector: "[fs-list-header]", inputs: ["colspan", "align", "class"] }, { type: i12__namespace.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }, { type: i7__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i17__namespace.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i17__namespace.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { type: i17__namespace.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { type: i7__namespace$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i7__namespace$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i7__namespace$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i7__namespace$1.NgSwitchDefault, selector: "[ngSwitchDefault]" }] });
|
|
1101
1080
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsAclEntriesComponent, decorators: [{
|
|
1102
1081
|
type: i0.Component,
|
|
1103
1082
|
args: [{
|
|
@@ -1115,6 +1094,8 @@
|
|
|
1115
1094
|
type: i0.Input
|
|
1116
1095
|
}], environmentLabel: [{
|
|
1117
1096
|
type: i0.Input
|
|
1097
|
+
}], environmentKey: [{
|
|
1098
|
+
type: i0.Input
|
|
1118
1099
|
}], actions: [{
|
|
1119
1100
|
type: i0.Input
|
|
1120
1101
|
}], aclEntriesList: [{
|