@firestitch/app-acl 9.0.15 → 9.0.19
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 +27 -23
- package/app/components/acl-entry/acl-entry.component.d.ts +23 -23
- package/app/components/acl-entry/index.d.ts +1 -1
- package/app/components/acl-object-roles/acl-object-roles.component.d.ts +14 -14
- package/app/components/acl-permission-popover/acl-permission-popover.component.d.ts +9 -9
- package/app/components/acl-permission-popover/index.d.ts +1 -1
- package/app/components/acl-role/acl-role.component.d.ts +43 -42
- package/app/components/acl-role-popover/acl-role-popover.component.d.ts +10 -10
- package/app/components/acl-roles/acl-roles.component.d.ts +31 -31
- package/app/consts/acl-role-accesses.d.ts +5 -5
- package/app/enums/acl-role-access.d.ts +6 -6
- package/app/enums/index.d.ts +1 -1
- package/app/fs-app-acl.module.d.ts +4 -4
- package/app/injectors/app-acl-config.injector.d.ts +2 -2
- package/app/injectors/index.d.ts +1 -1
- package/app/interfaces/acl-entry-data.d.ts +11 -11
- package/app/interfaces/acl-entry.d.ts +18 -18
- package/app/interfaces/acl-level.d.ts +3 -3
- package/app/interfaces/acl-object-entry.d.ts +11 -11
- package/app/interfaces/acl-object-role.d.ts +6 -6
- package/app/interfaces/acl-object.d.ts +4 -4
- package/app/interfaces/acl-permission.d.ts +7 -7
- package/app/interfaces/acl-role.d.ts +15 -15
- package/app/interfaces/app-acl-config.d.ts +7 -7
- package/app/interfaces/index.d.ts +11 -11
- package/app/interfaces/name-value.d.ts +4 -4
- package/app/services/app-acl.service.d.ts +13 -13
- package/app/services/index.d.ts +1 -1
- package/bundles/firestitch-app-acl.umd.js +858 -846
- package/bundles/firestitch-app-acl.umd.js.map +1 -1
- package/bundles/firestitch-app-acl.umd.min.js +2 -2
- package/bundles/firestitch-app-acl.umd.min.js.map +1 -1
- package/esm2015/app/components/acl-entries/acl-entries.component.js +177 -165
- package/esm2015/app/components/acl-entry/acl-entry.component.js +87 -87
- package/esm2015/app/components/acl-entry/index.js +1 -1
- package/esm2015/app/components/acl-object-roles/acl-object-roles.component.js +62 -62
- package/esm2015/app/components/acl-permission-popover/acl-permission-popover.component.js +34 -34
- package/esm2015/app/components/acl-permission-popover/index.js +1 -1
- package/esm2015/app/components/acl-role/acl-role.component.js +191 -191
- package/esm2015/app/components/acl-role-popover/acl-role-popover.component.js +40 -40
- package/esm2015/app/components/acl-roles/acl-roles.component.js +157 -157
- package/esm2015/app/consts/acl-role-accesses.js +7 -7
- package/esm2015/app/enums/acl-role-access.js +7 -7
- package/esm2015/app/enums/index.js +3 -3
- package/esm2015/app/fs-app-acl.module.js +81 -81
- package/esm2015/app/injectors/app-acl-config.injector.js +2 -2
- package/esm2015/app/injectors/index.js +4 -4
- package/esm2015/app/interfaces/index.js +1 -1
- package/esm2015/app/services/app-acl.service.js +80 -80
- package/esm2015/app/services/index.js +1 -1
- package/esm2015/firestitch-app-acl.js +11 -12
- package/esm2015/public_api.js +6 -5
- package/esm5/app/components/acl-entries/acl-entries.component.js +180 -168
- package/esm5/app/components/acl-entry/acl-entry.component.js +92 -92
- package/esm5/app/components/acl-entry/index.js +1 -1
- package/esm5/app/components/acl-object-roles/acl-object-roles.component.js +63 -63
- package/esm5/app/components/acl-permission-popover/acl-permission-popover.component.js +36 -36
- package/esm5/app/components/acl-permission-popover/index.js +1 -1
- package/esm5/app/components/acl-role/acl-role.component.js +201 -201
- package/esm5/app/components/acl-role-popover/acl-role-popover.component.js +42 -42
- package/esm5/app/components/acl-roles/acl-roles.component.js +162 -162
- package/esm5/app/consts/acl-role-accesses.js +7 -7
- package/esm5/app/enums/acl-role-access.js +7 -7
- package/esm5/app/enums/index.js +3 -3
- package/esm5/app/fs-app-acl.module.js +85 -85
- package/esm5/app/injectors/app-acl-config.injector.js +2 -2
- package/esm5/app/injectors/index.js +4 -4
- package/esm5/app/interfaces/index.js +1 -1
- package/esm5/app/services/app-acl.service.js +85 -85
- package/esm5/app/services/index.js +1 -1
- package/esm5/firestitch-app-acl.js +11 -12
- package/esm5/public_api.js +6 -5
- package/fesm2015/firestitch-app-acl.js +822 -810
- package/fesm2015/firestitch-app-acl.js.map +1 -1
- package/fesm5/firestitch-app-acl.js +859 -847
- package/fesm5/firestitch-app-acl.js.map +1 -1
- package/firestitch-app-acl.d.ts +11 -12
- package/firestitch-app-acl.metadata.json +1 -1
- package/package.json +1 -1
- package/public_api.d.ts +6 -5
|
@@ -6,7 +6,7 @@ import { MatButtonModule } from '@angular/material/button';
|
|
|
6
6
|
import { MatSelectModule } from '@angular/material/select';
|
|
7
7
|
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
8
8
|
import { MatDialogRef, MAT_DIALOG_DATA, MatDialog, MatDialogModule } from '@angular/material/dialog';
|
|
9
|
-
import { InjectionToken, Inject, ɵɵdefineInjectable, ɵɵinject, Injectable, ViewChild, Component,
|
|
9
|
+
import { InjectionToken, Inject, ɵɵdefineInjectable, ɵɵinject, Injectable, ChangeDetectorRef, ViewChild, Component, ChangeDetectionStrategy, QueryList, Input, ViewChildren, EventEmitter, Output, NgModule } from '@angular/core';
|
|
10
10
|
import { CommonModule } from '@angular/common';
|
|
11
11
|
import { FsListComponent, FsListModule } from '@firestitch/list';
|
|
12
12
|
import { FsPopoverModule } from '@firestitch/popover';
|
|
@@ -28,843 +28,855 @@ import { FsPrompt } from '@firestitch/prompt';
|
|
|
28
28
|
import { ControlContainer, NgForm, FormsModule } from '@angular/forms';
|
|
29
29
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
30
30
|
|
|
31
|
-
var AclRoleAccess;
|
|
32
|
-
(function (AclRoleAccess) {
|
|
33
|
-
AclRoleAccess[AclRoleAccess["None"] = 0] = "None";
|
|
34
|
-
AclRoleAccess[AclRoleAccess["Read"] = 5] = "Read";
|
|
35
|
-
AclRoleAccess[AclRoleAccess["Write"] = 10] = "Write";
|
|
36
|
-
AclRoleAccess[AclRoleAccess["Full"] = 15] = "Full";
|
|
31
|
+
var AclRoleAccess;
|
|
32
|
+
(function (AclRoleAccess) {
|
|
33
|
+
AclRoleAccess[AclRoleAccess["None"] = 0] = "None";
|
|
34
|
+
AclRoleAccess[AclRoleAccess["Read"] = 5] = "Read";
|
|
35
|
+
AclRoleAccess[AclRoleAccess["Write"] = 10] = "Write";
|
|
36
|
+
AclRoleAccess[AclRoleAccess["Full"] = 15] = "Full";
|
|
37
37
|
})(AclRoleAccess || (AclRoleAccess = {}));
|
|
38
38
|
|
|
39
|
-
// start:ng42.barrel
|
|
39
|
+
// start:ng42.barrel
|
|
40
40
|
// end:ng42.barrel
|
|
41
41
|
|
|
42
|
-
const AclRoleAccesses = [
|
|
43
|
-
{ name: 'None', value: AclRoleAccess.None },
|
|
44
|
-
{ name: 'Read', value: AclRoleAccess.Read },
|
|
45
|
-
{ name: 'Write', value: AclRoleAccess.Write },
|
|
46
|
-
{ name: 'Full', value: AclRoleAccess.Full }
|
|
42
|
+
const AclRoleAccesses = [
|
|
43
|
+
{ name: 'None', value: AclRoleAccess.None },
|
|
44
|
+
{ name: 'Read', value: AclRoleAccess.Read },
|
|
45
|
+
{ name: 'Write', value: AclRoleAccess.Write },
|
|
46
|
+
{ name: 'Full', value: AclRoleAccess.Full }
|
|
47
47
|
];
|
|
48
48
|
|
|
49
49
|
const FS_APP_ACL_CONFIG = new InjectionToken('fs-app-acl-config');
|
|
50
50
|
|
|
51
|
-
const snakecaseKeys = _snakecaseKeys;
|
|
52
|
-
const camelcaseKeys = _camelcaseKeys;
|
|
53
|
-
let FsAppAclService = class FsAppAclService {
|
|
54
|
-
constructor(_appAclConfig) {
|
|
55
|
-
this._appAclConfig = _appAclConfig;
|
|
56
|
-
}
|
|
57
|
-
getPermissions() {
|
|
58
|
-
if (!this._permissions$) {
|
|
59
|
-
this._permissions$ = new ReplaySubject();
|
|
60
|
-
this._appAclConfig.permissions
|
|
61
|
-
.pipe(map((data) => this.input(data)))
|
|
62
|
-
.subscribe((permissions) => {
|
|
63
|
-
this._permissions$.next(permissions);
|
|
64
|
-
this._permissions$.complete();
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
return this._permissions$;
|
|
68
|
-
}
|
|
69
|
-
getLevels() {
|
|
70
|
-
if (!this._levels$) {
|
|
71
|
-
this._levels$ = new ReplaySubject();
|
|
72
|
-
this._appAclConfig.levels
|
|
73
|
-
.pipe(map((data) => this.input(data)))
|
|
74
|
-
.subscribe((levels) => {
|
|
75
|
-
this._levels$.next(levels);
|
|
76
|
-
this._levels$.complete();
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
return this._levels$;
|
|
80
|
-
}
|
|
81
|
-
getIndexedLevels() {
|
|
82
|
-
return this.getLevels()
|
|
83
|
-
.pipe(map((data) => {
|
|
84
|
-
return list(data, 'name', 'value');
|
|
85
|
-
}));
|
|
86
|
-
}
|
|
87
|
-
input(data) {
|
|
88
|
-
if (isArray(data)) {
|
|
89
|
-
return data.map(item => {
|
|
90
|
-
return this._appAclConfig.case === 'snake' ? camelcaseKeys(item, { deep: true }) : item;
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
else {
|
|
94
|
-
return this._appAclConfig.case === 'snake' ? camelcaseKeys(data, { deep: true }) : data;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
output(data) {
|
|
98
|
-
if (isArray(data)) {
|
|
99
|
-
return data.map(item => {
|
|
100
|
-
return this._appAclConfig.case === 'snake' ? snakecaseKeys(item, { deep: true }) : item;
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
else {
|
|
104
|
-
return this._appAclConfig.case === 'snake' ? snakecaseKeys(data, { deep: true }) : data;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
};
|
|
108
|
-
FsAppAclService.ctorParameters = () => [
|
|
109
|
-
{ type: undefined, decorators: [{ type: Inject, args: [FS_APP_ACL_CONFIG,] }] }
|
|
110
|
-
];
|
|
111
|
-
FsAppAclService.ɵprov = ɵɵdefineInjectable({ factory: function FsAppAclService_Factory() { return new FsAppAclService(ɵɵinject(FS_APP_ACL_CONFIG)); }, token: FsAppAclService, providedIn: "root" });
|
|
112
|
-
FsAppAclService = __decorate([
|
|
113
|
-
Injectable({
|
|
114
|
-
providedIn: 'root',
|
|
115
|
-
}),
|
|
116
|
-
__param(0, Inject(FS_APP_ACL_CONFIG)),
|
|
117
|
-
__metadata("design:paramtypes", [Object])
|
|
51
|
+
const snakecaseKeys = _snakecaseKeys;
|
|
52
|
+
const camelcaseKeys = _camelcaseKeys;
|
|
53
|
+
let FsAppAclService = class FsAppAclService {
|
|
54
|
+
constructor(_appAclConfig) {
|
|
55
|
+
this._appAclConfig = _appAclConfig;
|
|
56
|
+
}
|
|
57
|
+
getPermissions() {
|
|
58
|
+
if (!this._permissions$) {
|
|
59
|
+
this._permissions$ = new ReplaySubject();
|
|
60
|
+
this._appAclConfig.permissions
|
|
61
|
+
.pipe(map((data) => this.input(data)))
|
|
62
|
+
.subscribe((permissions) => {
|
|
63
|
+
this._permissions$.next(permissions);
|
|
64
|
+
this._permissions$.complete();
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
return this._permissions$;
|
|
68
|
+
}
|
|
69
|
+
getLevels() {
|
|
70
|
+
if (!this._levels$) {
|
|
71
|
+
this._levels$ = new ReplaySubject();
|
|
72
|
+
this._appAclConfig.levels
|
|
73
|
+
.pipe(map((data) => this.input(data)))
|
|
74
|
+
.subscribe((levels) => {
|
|
75
|
+
this._levels$.next(levels);
|
|
76
|
+
this._levels$.complete();
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
return this._levels$;
|
|
80
|
+
}
|
|
81
|
+
getIndexedLevels() {
|
|
82
|
+
return this.getLevels()
|
|
83
|
+
.pipe(map((data) => {
|
|
84
|
+
return list(data, 'name', 'value');
|
|
85
|
+
}));
|
|
86
|
+
}
|
|
87
|
+
input(data) {
|
|
88
|
+
if (isArray(data)) {
|
|
89
|
+
return data.map(item => {
|
|
90
|
+
return this._appAclConfig.case === 'snake' ? camelcaseKeys(item, { deep: true }) : item;
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
else {
|
|
94
|
+
return this._appAclConfig.case === 'snake' ? camelcaseKeys(data, { deep: true }) : data;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
output(data) {
|
|
98
|
+
if (isArray(data)) {
|
|
99
|
+
return data.map(item => {
|
|
100
|
+
return this._appAclConfig.case === 'snake' ? snakecaseKeys(item, { deep: true }) : item;
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
else {
|
|
104
|
+
return this._appAclConfig.case === 'snake' ? snakecaseKeys(data, { deep: true }) : data;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
FsAppAclService.ctorParameters = () => [
|
|
109
|
+
{ type: undefined, decorators: [{ type: Inject, args: [FS_APP_ACL_CONFIG,] }] }
|
|
110
|
+
];
|
|
111
|
+
FsAppAclService.ɵprov = ɵɵdefineInjectable({ factory: function FsAppAclService_Factory() { return new FsAppAclService(ɵɵinject(FS_APP_ACL_CONFIG)); }, token: FsAppAclService, providedIn: "root" });
|
|
112
|
+
FsAppAclService = __decorate([
|
|
113
|
+
Injectable({
|
|
114
|
+
providedIn: 'root',
|
|
115
|
+
}),
|
|
116
|
+
__param(0, Inject(FS_APP_ACL_CONFIG)),
|
|
117
|
+
__metadata("design:paramtypes", [Object])
|
|
118
118
|
], FsAppAclService);
|
|
119
119
|
|
|
120
|
-
let FsAclRoleComponent = class FsAclRoleComponent {
|
|
121
|
-
constructor(_appAclService, _dialogRef, _message, _data) {
|
|
122
|
-
this._appAclService = _appAclService;
|
|
123
|
-
this._dialogRef = _dialogRef;
|
|
124
|
-
this._message = _message;
|
|
125
|
-
this._data = _data;
|
|
126
|
-
this.
|
|
127
|
-
this.
|
|
128
|
-
this.
|
|
129
|
-
this.
|
|
130
|
-
this.
|
|
131
|
-
this.
|
|
132
|
-
this.
|
|
133
|
-
this.
|
|
134
|
-
this.
|
|
135
|
-
this.
|
|
136
|
-
this.
|
|
137
|
-
this.
|
|
138
|
-
this.
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
this.
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
.
|
|
162
|
-
|
|
163
|
-
this.
|
|
164
|
-
this.
|
|
165
|
-
this.
|
|
166
|
-
this.
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
this.
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
return
|
|
203
|
-
},
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
a
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
{ type:
|
|
281
|
-
{ type:
|
|
282
|
-
{ type:
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
styles: [":host .permissions ::ng-deep .fs-list-row-group{background-color:#f6f6f6}:host .permissions ::ng-deep fs-list .access{white-space:nowrap}:host .permissions ::ng-deep .mat-form-field{width:100px}:host .permissions ::ng-deep .mat-form-field .mat-form-field-wrapper{padding-bottom:0}:host .permissions ::ng-deep .mat-form-field .mat-form-field-infix{border-top:0}:host .permissions ::ng-deep .mat-form-field .mat-form-field-underline{bottom:0}:host ::ng-deep fs-radio-group{width:100%}:host ::ng-deep fs-label-field{width:100%}:host .level{width:100%}"]
|
|
293
|
-
}),
|
|
294
|
-
__param(3, Inject(MAT_DIALOG_DATA)),
|
|
295
|
-
__metadata("design:paramtypes", [FsAppAclService,
|
|
296
|
-
MatDialogRef,
|
|
297
|
-
FsMessage, Object])
|
|
120
|
+
let FsAclRoleComponent = class FsAclRoleComponent {
|
|
121
|
+
constructor(_appAclService, _dialogRef, _message, _data, _cdRef) {
|
|
122
|
+
this._appAclService = _appAclService;
|
|
123
|
+
this._dialogRef = _dialogRef;
|
|
124
|
+
this._message = _message;
|
|
125
|
+
this._data = _data;
|
|
126
|
+
this._cdRef = _cdRef;
|
|
127
|
+
this.aclRole = null;
|
|
128
|
+
this.permissions = [];
|
|
129
|
+
this.levelPermissions = [];
|
|
130
|
+
this.AclRoleAccesses = AclRoleAccesses;
|
|
131
|
+
this.indexedAccesses = {};
|
|
132
|
+
this.aclLevels = [];
|
|
133
|
+
this.indexedAclLevels = {};
|
|
134
|
+
this.onlyFullAccess = false;
|
|
135
|
+
this.AclLevels = {};
|
|
136
|
+
this.aclRoleConfigs = [];
|
|
137
|
+
this.levelAclRoleConfigs = [];
|
|
138
|
+
this._destroy$ = new Subject();
|
|
139
|
+
this.save = () => {
|
|
140
|
+
const aclRole = Object.assign(Object.assign({}, this.aclRole), { permissions: this.levelPermissions.map((permission) => {
|
|
141
|
+
return {
|
|
142
|
+
value: permission.value,
|
|
143
|
+
access: this.aclRole.permissions[permission.value] || 0,
|
|
144
|
+
};
|
|
145
|
+
}), aclRoleConfigs: this.levelAclRoleConfigs.map((item) => {
|
|
146
|
+
return {
|
|
147
|
+
id: item.id,
|
|
148
|
+
value: item.value,
|
|
149
|
+
data: item.data,
|
|
150
|
+
};
|
|
151
|
+
}) });
|
|
152
|
+
return this._data.saveAclRole(this._appAclService.output(aclRole))
|
|
153
|
+
.pipe(tap((response) => {
|
|
154
|
+
this._message.success('Saved Changes');
|
|
155
|
+
this.close(response);
|
|
156
|
+
}));
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
ngOnInit() {
|
|
160
|
+
forkJoin(this.getRole(), this._appAclService.getPermissions())
|
|
161
|
+
.pipe(takeUntil(this._destroy$))
|
|
162
|
+
.subscribe(([aclRole, aclPermissions,]) => {
|
|
163
|
+
this.permissions = aclPermissions;
|
|
164
|
+
this.aclLevels = this._data.aclLevels;
|
|
165
|
+
this.indexedAclLevels = list(this.aclLevels, 'name', 'value');
|
|
166
|
+
this.indexedAccesses = list(AclRoleAccesses, 'name', 'value');
|
|
167
|
+
this.aclRole = Object.assign({
|
|
168
|
+
aclPermissions: [],
|
|
169
|
+
allPermissions: true,
|
|
170
|
+
aclRoleConfigs: [],
|
|
171
|
+
permissions: {},
|
|
172
|
+
level: this.aclLevels[0].value,
|
|
173
|
+
}, aclRole);
|
|
174
|
+
if (this.aclRole.id) {
|
|
175
|
+
this.permissions.forEach((permission) => {
|
|
176
|
+
let access = 0;
|
|
177
|
+
const aclPermission = this.aclRole.aclPermissions.find((item) => {
|
|
178
|
+
return item.permission === permission.value;
|
|
179
|
+
});
|
|
180
|
+
if (aclPermission) {
|
|
181
|
+
access = aclPermission.access;
|
|
182
|
+
}
|
|
183
|
+
this.aclRole.permissions[permission.value] = access;
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
if (this.aclRole.allPermissions) {
|
|
187
|
+
this._applyMaxPermissionAccess();
|
|
188
|
+
}
|
|
189
|
+
this._updatePermissions();
|
|
190
|
+
this._updateAclRoleConfigs();
|
|
191
|
+
this._cdRef.markForCheck();
|
|
192
|
+
});
|
|
193
|
+
this.listConfig = {
|
|
194
|
+
status: false,
|
|
195
|
+
paging: false,
|
|
196
|
+
noResults: {
|
|
197
|
+
message: '',
|
|
198
|
+
},
|
|
199
|
+
group: {
|
|
200
|
+
initialExpand: true,
|
|
201
|
+
groupBy: (data) => {
|
|
202
|
+
return data;
|
|
203
|
+
},
|
|
204
|
+
compareBy: (data) => {
|
|
205
|
+
return data.category || 'General';
|
|
206
|
+
},
|
|
207
|
+
},
|
|
208
|
+
fetch: () => {
|
|
209
|
+
return of({
|
|
210
|
+
data: this.levelPermissions.sort((a, b) => {
|
|
211
|
+
a = a.name.toUpperCase();
|
|
212
|
+
b = b.name.toUpperCase();
|
|
213
|
+
if (a < b) {
|
|
214
|
+
return -1;
|
|
215
|
+
}
|
|
216
|
+
else if (a > b) {
|
|
217
|
+
return 1;
|
|
218
|
+
}
|
|
219
|
+
return 0;
|
|
220
|
+
}),
|
|
221
|
+
});
|
|
222
|
+
},
|
|
223
|
+
};
|
|
224
|
+
}
|
|
225
|
+
levelChange() {
|
|
226
|
+
this._updatePermissions();
|
|
227
|
+
this._updateAclRoleConfigs();
|
|
228
|
+
setTimeout(() => {
|
|
229
|
+
this.list.reload();
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
getRole() {
|
|
233
|
+
if (!this._data.aclRole.id) {
|
|
234
|
+
return of(this._data.aclRole);
|
|
235
|
+
}
|
|
236
|
+
const query = {
|
|
237
|
+
aclPermissions: true,
|
|
238
|
+
aclRoleConfigs: true,
|
|
239
|
+
};
|
|
240
|
+
if (!this.environment) {
|
|
241
|
+
query.environmentId = null;
|
|
242
|
+
}
|
|
243
|
+
return this._data.loadAclRole(this._data.aclRole, query)
|
|
244
|
+
.pipe(map((data) => this._appAclService.input(data)));
|
|
245
|
+
}
|
|
246
|
+
close(data = null) {
|
|
247
|
+
this._dialogRef.close(data);
|
|
248
|
+
}
|
|
249
|
+
allPermissionsChange(all) {
|
|
250
|
+
this._updatePermissions();
|
|
251
|
+
if (all) {
|
|
252
|
+
this._applyMaxPermissionAccess();
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
ngOnDestroy() {
|
|
256
|
+
this._destroy$.next();
|
|
257
|
+
this._destroy$.complete();
|
|
258
|
+
}
|
|
259
|
+
_updatePermissions() {
|
|
260
|
+
this.levelPermissions = this.permissions.filter((permission) => {
|
|
261
|
+
return permission.levels.some((item) => {
|
|
262
|
+
return item === this.aclRole.level;
|
|
263
|
+
});
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
_updateAclRoleConfigs() {
|
|
267
|
+
this.levelAclRoleConfigs = this.aclRoleConfigs.filter((item) => {
|
|
268
|
+
return this.aclRole.level === item.level;
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
_applyMaxPermissionAccess() {
|
|
272
|
+
this.permissions.forEach((permission) => {
|
|
273
|
+
this.aclRole.permissions[permission.value] = Math.max(...permission.accesses);
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
};
|
|
277
|
+
FsAclRoleComponent.ctorParameters = () => [
|
|
278
|
+
{ type: FsAppAclService },
|
|
279
|
+
{ type: MatDialogRef },
|
|
280
|
+
{ type: FsMessage },
|
|
281
|
+
{ type: undefined, decorators: [{ type: Inject, args: [MAT_DIALOG_DATA,] }] },
|
|
282
|
+
{ type: ChangeDetectorRef }
|
|
283
|
+
];
|
|
284
|
+
__decorate([
|
|
285
|
+
ViewChild(FsListComponent),
|
|
286
|
+
__metadata("design:type", FsListComponent)
|
|
287
|
+
], FsAclRoleComponent.prototype, "list", void 0);
|
|
288
|
+
FsAclRoleComponent = __decorate([
|
|
289
|
+
Component({
|
|
290
|
+
template: "<form fsForm [submit]=\"save\">\n <fs-dialog>\n <ng-container *ngIf=\"aclRole\">\n <div mat-dialog-title>{{ aclRole.id ? 'Edit' : 'Create' }} Role</div>\n <mat-dialog-content>\n <div fxLayout=\"row\" fxLayout.lt-md=\"column\" fxLayoutGap=\"40px\" fxLayoutGap.lt-md=\"0\">\n <div fxLayout=\"column\" fxFlex fxFlex.lt-md=\"0\">\n <mat-form-field>\n <input matInput placeholder=\"Name\" [(ngModel)]=\"aclRole.name\" name=\"name\" fsFormRequired>\n </mat-form-field>\n\n <fs-label-field *ngIf=\"aclRole.id || aclLevels.length === 1; else levels\">\n <fs-label>Level</fs-label>\n {{indexedAclLevels[aclRole.level]}}\n </fs-label-field>\n\n <ng-template #levels>\n <div class=\"level\">\n <fs-radio-group\n [(ngModel)]=\"aclRole.level\"\n (ngModelChange)=\"levelChange()\"\n fsFormRequired\n label=\"Level\"\n orientation=\"vertical\"\n name=\"level\">\n <mat-radio-button\n *ngFor=\"let item of aclLevels\"\n [value]=\"item.value\"\n [disabled]=\"!!aclRole.protected\">\n {{ item.name }}\n </mat-radio-button>\n </fs-radio-group>\n </div>\n </ng-template>\n\n <fs-label-field *ngIf=\"levelPermissions.length\">\n <fs-label>All Permissions</fs-label>\n <mat-checkbox\n [(ngModel)]=\"aclRole.allPermissions\"\n (ngModelChange)=\"allPermissionsChange($event)\"\n [disabled]=\"!!aclRole.protected\"\n name=\"allPermissions\">\n </mat-checkbox>\n </fs-label-field>\n\n <div fxLayout=\"column\" *ngFor=\"let config of levelAclRoleConfigs\">\n <fs-label-field *ngIf=\"config.interface === 'checkbox'\">\n <fs-label>{{config.name}}</fs-label>\n <mat-checkbox\n [(ngModel)]=\"config.data\"\n [name]=\"config.name\">\n </mat-checkbox>\n <fs-label-message>\n <mat-hint>{{config.description}}</mat-hint>\n </fs-label-message>\n </fs-label-field>\n\n <mat-form-field *ngIf=\"config.interface === 'select'\">\n <mat-select\n [(ngModel)]=\"config.data\"\n [name]=\"config.value\"\n [required]=\"config.required\"\n [placeholder]=\"config.name\">\n <mat-option\n *ngFor=\"let item of config.values\"\n [value]=\"item.value\">\n {{ item.name }}\n </mat-option>\n </mat-select>\n <mat-hint>{{config.description}}</mat-hint>\n </mat-form-field>\n </div>\n </div>\n\n <div fxLayout=\"column\" fxFlex=\"65\" fxFlex.lt-md=\"0\" *ngIf=\"aclRole.level\" [hidden]=\"!levelPermissions.length\" class=\"permissions\">\n\n <fs-list [config]=\"listConfig\">\n <fs-list-column title=\"Permissions\">\n <ng-template colspan=\"2\" fs-list-group-cell let-row=\"row\" class=\"permission-group\">\n <small><b>{{row.category || 'General'}}</b></small>\n </ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n <div class=\"permission\">{{ row.name }}</div>\n <div class=\"description small\">{{ row.description }}</div>\n </ng-template>\n </fs-list-column>\n <fs-list-column title=\"Access\" width=\"1%\" class=\"access\">\n <ng-template fs-list-cell let-row=\"permission\" let-permission=\"row\">\n <span *ngIf=\"aclRole.allPermissions; else elseAll\">\n {{ indexedAccesses[aclRole.permissions[permission.value]] }}\n </span>\n <ng-template #elseAll>\n <mat-form-field>\n <mat-select\n [(ngModel)]=\"aclRole.permissions[permission.value]\"\n [disabled]=\"!!aclRole.protected\"\n fsFormRequired\n name=\"access-{{ permission.value }}\">\n <ng-container *ngFor=\"let access of AclRoleAccesses\">\n <mat-option\n *ngIf=\"access.value === 0 || permission.accesses.indexOf(access.value) !== -1\"\n [value]=\"access.value\">\n {{ access.name }}\n </mat-option>\n </ng-container>\n </mat-select>\n </mat-form-field>\n </ng-template>\n </ng-template>\n </fs-list-column>\n </fs-list>\n </div>\n </div>\n </mat-dialog-content>\n <mat-dialog-actions>\n <button mat-button type=\"submit\" color=\"primary\">{{ aclRole.id ? 'Save' : 'Create' }}</button>\n <button mat-button [mat-dialog-close]=\"null\" type=\"button\">Cancel</button>\n </mat-dialog-actions>\n </ng-container>\n </fs-dialog>\n</form>\n",
|
|
291
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
292
|
+
styles: [":host .permissions ::ng-deep .fs-list-row-group{background-color:#f6f6f6}:host .permissions ::ng-deep fs-list .access{white-space:nowrap}:host .permissions ::ng-deep .mat-form-field{width:100px}:host .permissions ::ng-deep .mat-form-field .mat-form-field-wrapper{padding-bottom:0}:host .permissions ::ng-deep .mat-form-field .mat-form-field-infix{border-top:0}:host .permissions ::ng-deep .mat-form-field .mat-form-field-underline{bottom:0}:host ::ng-deep fs-radio-group{width:100%}:host ::ng-deep fs-label-field{width:100%}:host .level{width:100%}"]
|
|
293
|
+
}),
|
|
294
|
+
__param(3, Inject(MAT_DIALOG_DATA)),
|
|
295
|
+
__metadata("design:paramtypes", [FsAppAclService,
|
|
296
|
+
MatDialogRef,
|
|
297
|
+
FsMessage, Object, ChangeDetectorRef])
|
|
298
298
|
], FsAclRoleComponent);
|
|
299
299
|
|
|
300
|
-
let FsAclRolesComponent = class FsAclRolesComponent {
|
|
301
|
-
constructor(_appAclService, _dialog, _cdRef) {
|
|
302
|
-
this._appAclService = _appAclService;
|
|
303
|
-
this._dialog = _dialog;
|
|
304
|
-
this._cdRef = _cdRef;
|
|
305
|
-
this.aclLevels = [];
|
|
306
|
-
this.list = new QueryList();
|
|
307
|
-
this.indexedAclRoleLevels = {};
|
|
308
|
-
this._destroy$ = new Subject();
|
|
309
|
-
}
|
|
310
|
-
ngOnInit() {
|
|
311
|
-
new Observable(observer => {
|
|
312
|
-
if (this.aclLevels.length) {
|
|
313
|
-
observer.next(this.aclLevels);
|
|
314
|
-
observer.complete();
|
|
315
|
-
}
|
|
316
|
-
else {
|
|
317
|
-
this._appAclService.getLevels()
|
|
318
|
-
.subscribe((aclLevels) => {
|
|
319
|
-
observer.next(aclLevels);
|
|
320
|
-
observer.complete();
|
|
321
|
-
});
|
|
322
|
-
}
|
|
323
|
-
})
|
|
324
|
-
.subscribe((aclLevels) => {
|
|
325
|
-
this.aclLevels = aclLevels;
|
|
326
|
-
this.indexedAclRoleLevels = list(this.aclLevels, 'name', 'value');
|
|
327
|
-
this._loadListConfig();
|
|
328
|
-
});
|
|
329
|
-
}
|
|
330
|
-
openDialog(aclRole = { id: null }) {
|
|
331
|
-
const dialogRef = this._dialog.open(FsAclRoleComponent, {
|
|
332
|
-
width: '70%',
|
|
333
|
-
data: {
|
|
334
|
-
aclRole,
|
|
335
|
-
aclLevels: this.aclLevels,
|
|
336
|
-
loadAclRole: this.loadAclRole,
|
|
337
|
-
saveAclRole: this.saveAclRole,
|
|
338
|
-
},
|
|
339
|
-
});
|
|
340
|
-
dialogRef.afterClosed()
|
|
341
|
-
.pipe(takeUntil(this._destroy$), filter((response) => !!response))
|
|
342
|
-
.subscribe((response) => {
|
|
343
|
-
this.list.forEach((list) => {
|
|
344
|
-
list.reload();
|
|
345
|
-
});
|
|
346
|
-
});
|
|
347
|
-
}
|
|
348
|
-
ngOnDestroy() {
|
|
349
|
-
this._destroy$.next();
|
|
350
|
-
this._destroy$.complete();
|
|
351
|
-
}
|
|
352
|
-
_loadListConfig() {
|
|
353
|
-
this.listConfig = {
|
|
354
|
-
sort: { value: 'hierarchy' },
|
|
355
|
-
filters: [
|
|
356
|
-
{
|
|
357
|
-
name: 'keyword',
|
|
358
|
-
type: ItemType.Keyword,
|
|
359
|
-
label: 'Search',
|
|
360
|
-
},
|
|
361
|
-
{
|
|
362
|
-
name: 'level',
|
|
363
|
-
label: 'Level',
|
|
364
|
-
type: ItemType.Select,
|
|
365
|
-
values: this.aclLevels,
|
|
366
|
-
hide: this.aclLevels.length <= 1
|
|
367
|
-
},
|
|
368
|
-
{
|
|
369
|
-
name: 'state',
|
|
370
|
-
label: 'Show Deleted',
|
|
371
|
-
type: ItemType.Checkbox,
|
|
372
|
-
unchecked: 'active',
|
|
373
|
-
checked: 'deleted',
|
|
374
|
-
},
|
|
375
|
-
],
|
|
376
|
-
actions: [
|
|
377
|
-
{
|
|
378
|
-
click: (event) => {
|
|
379
|
-
this.openDialog();
|
|
380
|
-
},
|
|
381
|
-
label: 'Create',
|
|
382
|
-
},
|
|
383
|
-
],
|
|
384
|
-
rowActions: [
|
|
385
|
-
{
|
|
386
|
-
click: (data) => {
|
|
387
|
-
return this.deleteAclRole(this._appAclService.output(data));
|
|
388
|
-
},
|
|
389
|
-
remove: {
|
|
390
|
-
title: 'Confirm',
|
|
391
|
-
template: 'Are you sure you would like to delete this role?',
|
|
392
|
-
},
|
|
393
|
-
menu: true,
|
|
394
|
-
label: 'Delete',
|
|
395
|
-
show: (row) => row.state !== 'deleted',
|
|
396
|
-
},
|
|
397
|
-
],
|
|
398
|
-
fetch: (query) => {
|
|
399
|
-
query.permissions = true;
|
|
400
|
-
return this.loadAclRoles(query)
|
|
401
|
-
.pipe(map((data) => this._appAclService.input(data)));
|
|
402
|
-
},
|
|
403
|
-
};
|
|
404
|
-
}
|
|
405
|
-
};
|
|
406
|
-
FsAclRolesComponent.ctorParameters = () => [
|
|
407
|
-
{ type: FsAppAclService },
|
|
408
|
-
{ type: MatDialog },
|
|
409
|
-
{ type: ChangeDetectorRef }
|
|
410
|
-
];
|
|
411
|
-
__decorate([
|
|
412
|
-
Input(),
|
|
413
|
-
__metadata("design:type", Function)
|
|
414
|
-
], FsAclRolesComponent.prototype, "deleteAclRole", void 0);
|
|
415
|
-
__decorate([
|
|
416
|
-
Input(),
|
|
417
|
-
__metadata("design:type", Function)
|
|
418
|
-
], FsAclRolesComponent.prototype, "saveAclRole", void 0);
|
|
419
|
-
__decorate([
|
|
420
|
-
Input(),
|
|
421
|
-
__metadata("design:type", Function)
|
|
422
|
-
], FsAclRolesComponent.prototype, "loadAclRoles", void 0);
|
|
423
|
-
__decorate([
|
|
424
|
-
Input(),
|
|
425
|
-
__metadata("design:type", Function)
|
|
426
|
-
], FsAclRolesComponent.prototype, "loadAclRole", void 0);
|
|
427
|
-
__decorate([
|
|
428
|
-
Input(),
|
|
429
|
-
__metadata("design:type", Array)
|
|
430
|
-
], FsAclRolesComponent.prototype, "aclLevels", void 0);
|
|
431
|
-
__decorate([
|
|
432
|
-
ViewChildren(FsListComponent),
|
|
433
|
-
__metadata("design:type", Object)
|
|
434
|
-
], FsAclRolesComponent.prototype, "list", void 0);
|
|
435
|
-
FsAclRolesComponent = __decorate([
|
|
436
|
-
Component({
|
|
437
|
-
selector: 'fs-acl-roles',
|
|
438
|
-
template: "<fs-list [config]=\"listConfig\" *ngIf=\"listConfig\">\n <fs-list-column title=\"Name\" name=\"name\" [sortable]=\"true\">\n <ng-template fs-list-cell let-row=\"row\">\n <a (click)=\"openDialog(row)\">{{ row.name }}</a>\n </ng-template>\n </fs-list-column>\n <fs-list-column name=\"hierarchy\" title=\"Level\" [sortable]=\"true\">\n <ng-template fs-list-cell let-row=\"row\">\n {{ indexedAclRoleLevels[row.level] }}\n </ng-template>\n </fs-list-column>\n <fs-list-column title=\"Permissions\">\n <ng-template fs-list-cell let-row=\"row\">\n <div class=\"permissions\">\n <ng-container *ngFor=\"let permission of row.permissions\">\n <span *ngIf=\"permission.access\" class=\"permission\">\n <acl-permission-popover [permission]=\"permission\">{{permission.name}}</acl-permission-popover>\n </span>\n </ng-container>\n </div>\n </ng-template>\n </fs-list-column>\n</fs-list>\n",
|
|
439
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
440
|
-
styles: [".permissions .permission+.permission::before{content:\", \"}"]
|
|
441
|
-
}),
|
|
442
|
-
__metadata("design:paramtypes", [FsAppAclService,
|
|
443
|
-
MatDialog,
|
|
444
|
-
ChangeDetectorRef])
|
|
300
|
+
let FsAclRolesComponent = class FsAclRolesComponent {
|
|
301
|
+
constructor(_appAclService, _dialog, _cdRef) {
|
|
302
|
+
this._appAclService = _appAclService;
|
|
303
|
+
this._dialog = _dialog;
|
|
304
|
+
this._cdRef = _cdRef;
|
|
305
|
+
this.aclLevels = [];
|
|
306
|
+
this.list = new QueryList();
|
|
307
|
+
this.indexedAclRoleLevels = {};
|
|
308
|
+
this._destroy$ = new Subject();
|
|
309
|
+
}
|
|
310
|
+
ngOnInit() {
|
|
311
|
+
new Observable(observer => {
|
|
312
|
+
if (this.aclLevels.length) {
|
|
313
|
+
observer.next(this.aclLevels);
|
|
314
|
+
observer.complete();
|
|
315
|
+
}
|
|
316
|
+
else {
|
|
317
|
+
this._appAclService.getLevels()
|
|
318
|
+
.subscribe((aclLevels) => {
|
|
319
|
+
observer.next(aclLevels);
|
|
320
|
+
observer.complete();
|
|
321
|
+
});
|
|
322
|
+
}
|
|
323
|
+
})
|
|
324
|
+
.subscribe((aclLevels) => {
|
|
325
|
+
this.aclLevels = aclLevels;
|
|
326
|
+
this.indexedAclRoleLevels = list(this.aclLevels, 'name', 'value');
|
|
327
|
+
this._loadListConfig();
|
|
328
|
+
});
|
|
329
|
+
}
|
|
330
|
+
openDialog(aclRole = { id: null }) {
|
|
331
|
+
const dialogRef = this._dialog.open(FsAclRoleComponent, {
|
|
332
|
+
width: '70%',
|
|
333
|
+
data: {
|
|
334
|
+
aclRole,
|
|
335
|
+
aclLevels: this.aclLevels,
|
|
336
|
+
loadAclRole: this.loadAclRole,
|
|
337
|
+
saveAclRole: this.saveAclRole,
|
|
338
|
+
},
|
|
339
|
+
});
|
|
340
|
+
dialogRef.afterClosed()
|
|
341
|
+
.pipe(takeUntil(this._destroy$), filter((response) => !!response))
|
|
342
|
+
.subscribe((response) => {
|
|
343
|
+
this.list.forEach((list) => {
|
|
344
|
+
list.reload();
|
|
345
|
+
});
|
|
346
|
+
});
|
|
347
|
+
}
|
|
348
|
+
ngOnDestroy() {
|
|
349
|
+
this._destroy$.next();
|
|
350
|
+
this._destroy$.complete();
|
|
351
|
+
}
|
|
352
|
+
_loadListConfig() {
|
|
353
|
+
this.listConfig = {
|
|
354
|
+
sort: { value: 'hierarchy' },
|
|
355
|
+
filters: [
|
|
356
|
+
{
|
|
357
|
+
name: 'keyword',
|
|
358
|
+
type: ItemType.Keyword,
|
|
359
|
+
label: 'Search',
|
|
360
|
+
},
|
|
361
|
+
{
|
|
362
|
+
name: 'level',
|
|
363
|
+
label: 'Level',
|
|
364
|
+
type: ItemType.Select,
|
|
365
|
+
values: this.aclLevels,
|
|
366
|
+
hide: this.aclLevels.length <= 1
|
|
367
|
+
},
|
|
368
|
+
{
|
|
369
|
+
name: 'state',
|
|
370
|
+
label: 'Show Deleted',
|
|
371
|
+
type: ItemType.Checkbox,
|
|
372
|
+
unchecked: 'active',
|
|
373
|
+
checked: 'deleted',
|
|
374
|
+
},
|
|
375
|
+
],
|
|
376
|
+
actions: [
|
|
377
|
+
{
|
|
378
|
+
click: (event) => {
|
|
379
|
+
this.openDialog();
|
|
380
|
+
},
|
|
381
|
+
label: 'Create',
|
|
382
|
+
},
|
|
383
|
+
],
|
|
384
|
+
rowActions: [
|
|
385
|
+
{
|
|
386
|
+
click: (data) => {
|
|
387
|
+
return this.deleteAclRole(this._appAclService.output(data));
|
|
388
|
+
},
|
|
389
|
+
remove: {
|
|
390
|
+
title: 'Confirm',
|
|
391
|
+
template: 'Are you sure you would like to delete this role?',
|
|
392
|
+
},
|
|
393
|
+
menu: true,
|
|
394
|
+
label: 'Delete',
|
|
395
|
+
show: (row) => row.state !== 'deleted',
|
|
396
|
+
},
|
|
397
|
+
],
|
|
398
|
+
fetch: (query) => {
|
|
399
|
+
query.permissions = true;
|
|
400
|
+
return this.loadAclRoles(query)
|
|
401
|
+
.pipe(map((data) => this._appAclService.input(data)));
|
|
402
|
+
},
|
|
403
|
+
};
|
|
404
|
+
}
|
|
405
|
+
};
|
|
406
|
+
FsAclRolesComponent.ctorParameters = () => [
|
|
407
|
+
{ type: FsAppAclService },
|
|
408
|
+
{ type: MatDialog },
|
|
409
|
+
{ type: ChangeDetectorRef }
|
|
410
|
+
];
|
|
411
|
+
__decorate([
|
|
412
|
+
Input(),
|
|
413
|
+
__metadata("design:type", Function)
|
|
414
|
+
], FsAclRolesComponent.prototype, "deleteAclRole", void 0);
|
|
415
|
+
__decorate([
|
|
416
|
+
Input(),
|
|
417
|
+
__metadata("design:type", Function)
|
|
418
|
+
], FsAclRolesComponent.prototype, "saveAclRole", void 0);
|
|
419
|
+
__decorate([
|
|
420
|
+
Input(),
|
|
421
|
+
__metadata("design:type", Function)
|
|
422
|
+
], FsAclRolesComponent.prototype, "loadAclRoles", void 0);
|
|
423
|
+
__decorate([
|
|
424
|
+
Input(),
|
|
425
|
+
__metadata("design:type", Function)
|
|
426
|
+
], FsAclRolesComponent.prototype, "loadAclRole", void 0);
|
|
427
|
+
__decorate([
|
|
428
|
+
Input(),
|
|
429
|
+
__metadata("design:type", Array)
|
|
430
|
+
], FsAclRolesComponent.prototype, "aclLevels", void 0);
|
|
431
|
+
__decorate([
|
|
432
|
+
ViewChildren(FsListComponent),
|
|
433
|
+
__metadata("design:type", Object)
|
|
434
|
+
], FsAclRolesComponent.prototype, "list", void 0);
|
|
435
|
+
FsAclRolesComponent = __decorate([
|
|
436
|
+
Component({
|
|
437
|
+
selector: 'fs-acl-roles',
|
|
438
|
+
template: "<fs-list [config]=\"listConfig\" *ngIf=\"listConfig\">\n <fs-list-column title=\"Name\" name=\"name\" [sortable]=\"true\">\n <ng-template fs-list-cell let-row=\"row\">\n <a (click)=\"openDialog(row)\">{{ row.name }}</a>\n </ng-template>\n </fs-list-column>\n <fs-list-column name=\"hierarchy\" title=\"Level\" [sortable]=\"true\">\n <ng-template fs-list-cell let-row=\"row\">\n {{ indexedAclRoleLevels[row.level] }}\n </ng-template>\n </fs-list-column>\n <fs-list-column title=\"Permissions\">\n <ng-template fs-list-cell let-row=\"row\">\n <div class=\"permissions\">\n <ng-container *ngFor=\"let permission of row.permissions\">\n <span *ngIf=\"permission.access\" class=\"permission\">\n <acl-permission-popover [permission]=\"permission\">{{permission.name}}</acl-permission-popover>\n </span>\n </ng-container>\n </div>\n </ng-template>\n </fs-list-column>\n</fs-list>\n",
|
|
439
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
440
|
+
styles: [".permissions .permission+.permission::before{content:\", \"}"]
|
|
441
|
+
}),
|
|
442
|
+
__metadata("design:paramtypes", [FsAppAclService,
|
|
443
|
+
MatDialog,
|
|
444
|
+
ChangeDetectorRef])
|
|
445
445
|
], FsAclRolesComponent);
|
|
446
446
|
|
|
447
|
-
let FsAclPermissionPopoverComponent = class FsAclPermissionPopoverComponent {
|
|
448
|
-
constructor(_appAclService) {
|
|
449
|
-
this._appAclService = _appAclService;
|
|
450
|
-
}
|
|
451
|
-
ngOnInit() {
|
|
452
|
-
this._appAclService.getPermissions()
|
|
453
|
-
.subscribe(permissions => {
|
|
454
|
-
this.description = permissions.filter(item => {
|
|
455
|
-
return item.value === this.permission.value;
|
|
456
|
-
}).map(item => {
|
|
457
|
-
return item.description;
|
|
458
|
-
})[0];
|
|
459
|
-
});
|
|
460
|
-
}
|
|
461
|
-
};
|
|
462
|
-
FsAclPermissionPopoverComponent.ctorParameters = () => [
|
|
463
|
-
{ type: FsAppAclService }
|
|
464
|
-
];
|
|
465
|
-
__decorate([
|
|
466
|
-
Input(),
|
|
467
|
-
__metadata("design:type", Object)
|
|
468
|
-
], FsAclPermissionPopoverComponent.prototype, "permission", void 0);
|
|
469
|
-
FsAclPermissionPopoverComponent = __decorate([
|
|
470
|
-
Component({
|
|
471
|
-
selector: 'acl-permission-popover',
|
|
472
|
-
template: "\n<fs-popover [template]=\"popover\" maxWidth=\"400\">\n <ng-content></ng-content>\n</fs-popover>\n\n<ng-template #popover>\n {{permission.name}}\n <div class=\"small\">{{description}}</div>\n</ng-template>\n\n",
|
|
473
|
-
styles: [":host{cursor:pointer}"]
|
|
474
|
-
}),
|
|
475
|
-
__metadata("design:paramtypes", [FsAppAclService])
|
|
447
|
+
let FsAclPermissionPopoverComponent = class FsAclPermissionPopoverComponent {
|
|
448
|
+
constructor(_appAclService) {
|
|
449
|
+
this._appAclService = _appAclService;
|
|
450
|
+
}
|
|
451
|
+
ngOnInit() {
|
|
452
|
+
this._appAclService.getPermissions()
|
|
453
|
+
.subscribe(permissions => {
|
|
454
|
+
this.description = permissions.filter(item => {
|
|
455
|
+
return item.value === this.permission.value;
|
|
456
|
+
}).map(item => {
|
|
457
|
+
return item.description;
|
|
458
|
+
})[0];
|
|
459
|
+
});
|
|
460
|
+
}
|
|
461
|
+
};
|
|
462
|
+
FsAclPermissionPopoverComponent.ctorParameters = () => [
|
|
463
|
+
{ type: FsAppAclService }
|
|
464
|
+
];
|
|
465
|
+
__decorate([
|
|
466
|
+
Input(),
|
|
467
|
+
__metadata("design:type", Object)
|
|
468
|
+
], FsAclPermissionPopoverComponent.prototype, "permission", void 0);
|
|
469
|
+
FsAclPermissionPopoverComponent = __decorate([
|
|
470
|
+
Component({
|
|
471
|
+
selector: 'acl-permission-popover',
|
|
472
|
+
template: "\n<fs-popover [template]=\"popover\" maxWidth=\"400\">\n <ng-content></ng-content>\n</fs-popover>\n\n<ng-template #popover>\n {{permission.name}}\n <div class=\"small\">{{description}}</div>\n</ng-template>\n\n",
|
|
473
|
+
styles: [":host{cursor:pointer}"]
|
|
474
|
+
}),
|
|
475
|
+
__metadata("design:paramtypes", [FsAppAclService])
|
|
476
476
|
], FsAclPermissionPopoverComponent);
|
|
477
477
|
|
|
478
|
-
let FsAclRolePopoverComponent = class FsAclRolePopoverComponent {
|
|
479
|
-
constructor(_appAclService) {
|
|
480
|
-
this._appAclService = _appAclService;
|
|
481
|
-
this.permissions = [];
|
|
482
|
-
}
|
|
483
|
-
ngOnInit() {
|
|
484
|
-
const aclRolePermissions = this.aclRole.permissions || [];
|
|
485
|
-
this._appAclService.getPermissions()
|
|
486
|
-
.subscribe((response) => {
|
|
487
|
-
this.permissions = response.filter(item => {
|
|
488
|
-
return aclRolePermissions.some(permission => {
|
|
489
|
-
return item.value === permission.value;
|
|
490
|
-
});
|
|
491
|
-
});
|
|
492
|
-
});
|
|
493
|
-
}
|
|
494
|
-
};
|
|
495
|
-
FsAclRolePopoverComponent.ctorParameters = () => [
|
|
496
|
-
{ type: FsAppAclService }
|
|
497
|
-
];
|
|
498
|
-
__decorate([
|
|
499
|
-
Input(),
|
|
500
|
-
__metadata("design:type", Object)
|
|
501
|
-
], FsAclRolePopoverComponent.prototype, "aclRole", void 0);
|
|
502
|
-
__decorate([
|
|
503
|
-
Input(),
|
|
504
|
-
__metadata("design:type", Object)
|
|
505
|
-
], FsAclRolePopoverComponent.prototype, "objectName", void 0);
|
|
506
|
-
FsAclRolePopoverComponent = __decorate([
|
|
507
|
-
Component({
|
|
508
|
-
selector: 'fs-acl-role-popover',
|
|
509
|
-
template: "\n<fs-popover [template]=\"popover\" maxWidth=\"400\">\n <ng-content></ng-content>\n</fs-popover>\n\n<ng-template #popover>\n <div class=\"name small\">{{aclRole.name}}<span *ngIf=\"objectName\">: {{objectName}}</span></div>\n\n <ng-container *ngIf=\"permissions.length; else nonePermission\">\n <div *ngFor=\"let permission of permissions\" class=\"permission\">\n <div>{{permission.name}}</div>\n <div class=\"small\">{{permission.description}}</div>\n </div>\n </ng-container>\n\n <ng-template #nonePermission>\n None\n </ng-template>\n</ng-template>\n",
|
|
510
|
-
styles: [".name{padding-bottom:10px}.permission+.permission{padding-top:5px}:host{cursor:pointer}"]
|
|
511
|
-
}),
|
|
512
|
-
__metadata("design:paramtypes", [FsAppAclService])
|
|
478
|
+
let FsAclRolePopoverComponent = class FsAclRolePopoverComponent {
|
|
479
|
+
constructor(_appAclService) {
|
|
480
|
+
this._appAclService = _appAclService;
|
|
481
|
+
this.permissions = [];
|
|
482
|
+
}
|
|
483
|
+
ngOnInit() {
|
|
484
|
+
const aclRolePermissions = this.aclRole.permissions || [];
|
|
485
|
+
this._appAclService.getPermissions()
|
|
486
|
+
.subscribe((response) => {
|
|
487
|
+
this.permissions = response.filter(item => {
|
|
488
|
+
return aclRolePermissions.some(permission => {
|
|
489
|
+
return item.value === permission.value;
|
|
490
|
+
});
|
|
491
|
+
});
|
|
492
|
+
});
|
|
493
|
+
}
|
|
494
|
+
};
|
|
495
|
+
FsAclRolePopoverComponent.ctorParameters = () => [
|
|
496
|
+
{ type: FsAppAclService }
|
|
497
|
+
];
|
|
498
|
+
__decorate([
|
|
499
|
+
Input(),
|
|
500
|
+
__metadata("design:type", Object)
|
|
501
|
+
], FsAclRolePopoverComponent.prototype, "aclRole", void 0);
|
|
502
|
+
__decorate([
|
|
503
|
+
Input(),
|
|
504
|
+
__metadata("design:type", Object)
|
|
505
|
+
], FsAclRolePopoverComponent.prototype, "objectName", void 0);
|
|
506
|
+
FsAclRolePopoverComponent = __decorate([
|
|
507
|
+
Component({
|
|
508
|
+
selector: 'fs-acl-role-popover',
|
|
509
|
+
template: "\n<fs-popover [template]=\"popover\" maxWidth=\"400\">\n <ng-content></ng-content>\n</fs-popover>\n\n<ng-template #popover>\n <div class=\"name small\">{{aclRole.name}}<span *ngIf=\"objectName\">: {{objectName}}</span></div>\n\n <ng-container *ngIf=\"permissions.length; else nonePermission\">\n <div *ngFor=\"let permission of permissions\" class=\"permission\">\n <div>{{permission.name}}</div>\n <div class=\"small\">{{permission.description}}</div>\n </div>\n </ng-container>\n\n <ng-template #nonePermission>\n None\n </ng-template>\n</ng-template>\n",
|
|
510
|
+
styles: [".name{padding-bottom:10px}.permission+.permission{padding-top:5px}:host{cursor:pointer}"]
|
|
511
|
+
}),
|
|
512
|
+
__metadata("design:paramtypes", [FsAppAclService])
|
|
513
513
|
], FsAclRolePopoverComponent);
|
|
514
514
|
|
|
515
|
-
let FsAclEntryComponent = class FsAclEntryComponent {
|
|
516
|
-
constructor(_appAclService, _dialogRef, _message, _data) {
|
|
517
|
-
var _a;
|
|
518
|
-
this._appAclService = _appAclService;
|
|
519
|
-
this._dialogRef = _dialogRef;
|
|
520
|
-
this._message = _message;
|
|
521
|
-
this._data = _data;
|
|
522
|
-
this.aclRoles = [];
|
|
523
|
-
this.indexedAclRoleLevels = {};
|
|
524
|
-
this.titleEdit = 'Edit Roles';
|
|
525
|
-
this.titleAdd = 'Assign Roles';
|
|
526
|
-
this.required = true;
|
|
527
|
-
this.save = () => {
|
|
528
|
-
return this._data.saveAclObjectEntry(this._appAclService.output(this.aclObjectEntry))
|
|
529
|
-
.subscribe((data) => {
|
|
530
|
-
this._message.success('Saved Changes');
|
|
531
|
-
this.close(data);
|
|
532
|
-
});
|
|
533
|
-
};
|
|
534
|
-
this.aclObjectEntry = Object.assign({}, _data.aclObjectEntry);
|
|
535
|
-
this.required = (_a = _data.required, (_a !== null && _a !== void 0 ? _a : true));
|
|
536
|
-
if (_data.titleEdit) {
|
|
537
|
-
this.titleEdit = _data.titleEdit;
|
|
538
|
-
}
|
|
539
|
-
if (_data.titleAdd) {
|
|
540
|
-
this.titleAdd = _data.titleAdd;
|
|
541
|
-
}
|
|
542
|
-
}
|
|
543
|
-
ngOnInit() {
|
|
544
|
-
forkJoin(this._data.loadAclRoles({
|
|
545
|
-
level: this.aclObjectEntry.level,
|
|
546
|
-
environmentId: this.aclObjectEntry.environmentId,
|
|
547
|
-
})
|
|
548
|
-
.pipe(map((data) => this._appAclService.input(data))), this._appAclService.getIndexedLevels())
|
|
549
|
-
.subscribe(([aclRoles, levels,]) => {
|
|
550
|
-
this.aclRoles = aclRoles;
|
|
551
|
-
this.indexedAclRoleLevels = levels;
|
|
552
|
-
this.aclObjectRole = {
|
|
553
|
-
object: this.aclObjectEntry.object,
|
|
554
|
-
aclRoles: this.aclObjectEntry.aclEntries
|
|
555
|
-
.map((aclEntry) => {
|
|
556
|
-
return aclEntry.aclRole;
|
|
557
|
-
})
|
|
558
|
-
};
|
|
559
|
-
});
|
|
560
|
-
}
|
|
561
|
-
aclObjectRoleChange(aclObjectRoles) {
|
|
562
|
-
this.aclObjectEntry.aclEntries = aclObjectRoles.reduce((aclEntries, aclObjectRole) => {
|
|
563
|
-
aclObjectRole.aclRoles.forEach(aclRole => {
|
|
564
|
-
aclEntries.push({
|
|
565
|
-
aclRoleId: aclRole.id,
|
|
566
|
-
aclRole: aclRole,
|
|
567
|
-
objectId: aclObjectRole.object ? aclObjectRole.object.id : null,
|
|
568
|
-
object: aclObjectRole.object || null
|
|
569
|
-
});
|
|
570
|
-
});
|
|
571
|
-
return aclEntries;
|
|
572
|
-
}, []);
|
|
573
|
-
}
|
|
574
|
-
close(data = null) {
|
|
575
|
-
this._dialogRef.close(data);
|
|
576
|
-
}
|
|
577
|
-
};
|
|
578
|
-
FsAclEntryComponent.ctorParameters = () => [
|
|
579
|
-
{ type: FsAppAclService },
|
|
580
|
-
{ type: MatDialogRef },
|
|
581
|
-
{ type: FsMessage },
|
|
582
|
-
{ type: undefined, decorators: [{ type: Inject, args: [MAT_DIALOG_DATA,] }] }
|
|
583
|
-
];
|
|
584
|
-
FsAclEntryComponent = __decorate([
|
|
585
|
-
Component({
|
|
586
|
-
template: "<form fsForm [submit]=\"save\">\n <fs-dialog>\n <div mat-dialog-title>{{ titleEdit? titleEdit : titleAdd }}</div>\n <mat-dialog-content>\n <div *ngIf=\"aclObjectRole\">\n <fs-label-field *ngIf=\"aclObjectEntry.object\">\n <fs-label>{{indexedAclRoleLevels[aclObjectEntry.level]}}</fs-label>\n {{aclObjectEntry.object.name}}\n </fs-label-field>\n\n <fs-acl-object-roles\n [aclRoles]=\"aclRoles\"\n [aclObjectRoles]=\"[aclObjectRole]\"\n [required]=\"required\"\n (change)=\"aclObjectRoleChange($event)\">\n </fs-acl-object-roles>\n </div>\n </mat-dialog-content>\n <mat-dialog-actions>\n <button mat-button type=\"submit\" color=\"primary\">Save</button>\n <button mat-button mat-dialog-close type=\"button\">Cancel</button>\n </mat-dialog-actions>\n </fs-dialog>\n</form>\n",
|
|
587
|
-
styles: ["::ng-deep .account-roles-autocomplete-panel .mat-option{line-height:normal}::ng-deep .account-roles-autocomplete-panel .mat-option .mat-option-text{display:flex;flex-direction:row;align-items:center}::ng-deep .account-roles-autocomplete-panel .mat-option .mat-option-text fs-badge{margin-right:5px}"]
|
|
588
|
-
}),
|
|
589
|
-
__param(3, Inject(MAT_DIALOG_DATA)),
|
|
590
|
-
__metadata("design:paramtypes", [FsAppAclService,
|
|
591
|
-
MatDialogRef,
|
|
592
|
-
FsMessage, Object])
|
|
515
|
+
let FsAclEntryComponent = class FsAclEntryComponent {
|
|
516
|
+
constructor(_appAclService, _dialogRef, _message, _data) {
|
|
517
|
+
var _a;
|
|
518
|
+
this._appAclService = _appAclService;
|
|
519
|
+
this._dialogRef = _dialogRef;
|
|
520
|
+
this._message = _message;
|
|
521
|
+
this._data = _data;
|
|
522
|
+
this.aclRoles = [];
|
|
523
|
+
this.indexedAclRoleLevels = {};
|
|
524
|
+
this.titleEdit = 'Edit Roles';
|
|
525
|
+
this.titleAdd = 'Assign Roles';
|
|
526
|
+
this.required = true;
|
|
527
|
+
this.save = () => {
|
|
528
|
+
return this._data.saveAclObjectEntry(this._appAclService.output(this.aclObjectEntry))
|
|
529
|
+
.subscribe((data) => {
|
|
530
|
+
this._message.success('Saved Changes');
|
|
531
|
+
this.close(data);
|
|
532
|
+
});
|
|
533
|
+
};
|
|
534
|
+
this.aclObjectEntry = Object.assign({}, _data.aclObjectEntry);
|
|
535
|
+
this.required = (_a = _data.required, (_a !== null && _a !== void 0 ? _a : true));
|
|
536
|
+
if (_data.titleEdit) {
|
|
537
|
+
this.titleEdit = _data.titleEdit;
|
|
538
|
+
}
|
|
539
|
+
if (_data.titleAdd) {
|
|
540
|
+
this.titleAdd = _data.titleAdd;
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
ngOnInit() {
|
|
544
|
+
forkJoin(this._data.loadAclRoles({
|
|
545
|
+
level: this.aclObjectEntry.level,
|
|
546
|
+
environmentId: this.aclObjectEntry.environmentId,
|
|
547
|
+
})
|
|
548
|
+
.pipe(map((data) => this._appAclService.input(data))), this._appAclService.getIndexedLevels())
|
|
549
|
+
.subscribe(([aclRoles, levels,]) => {
|
|
550
|
+
this.aclRoles = aclRoles;
|
|
551
|
+
this.indexedAclRoleLevels = levels;
|
|
552
|
+
this.aclObjectRole = {
|
|
553
|
+
object: this.aclObjectEntry.object,
|
|
554
|
+
aclRoles: this.aclObjectEntry.aclEntries
|
|
555
|
+
.map((aclEntry) => {
|
|
556
|
+
return aclEntry.aclRole;
|
|
557
|
+
})
|
|
558
|
+
};
|
|
559
|
+
});
|
|
560
|
+
}
|
|
561
|
+
aclObjectRoleChange(aclObjectRoles) {
|
|
562
|
+
this.aclObjectEntry.aclEntries = aclObjectRoles.reduce((aclEntries, aclObjectRole) => {
|
|
563
|
+
aclObjectRole.aclRoles.forEach(aclRole => {
|
|
564
|
+
aclEntries.push({
|
|
565
|
+
aclRoleId: aclRole.id,
|
|
566
|
+
aclRole: aclRole,
|
|
567
|
+
objectId: aclObjectRole.object ? aclObjectRole.object.id : null,
|
|
568
|
+
object: aclObjectRole.object || null
|
|
569
|
+
});
|
|
570
|
+
});
|
|
571
|
+
return aclEntries;
|
|
572
|
+
}, []);
|
|
573
|
+
}
|
|
574
|
+
close(data = null) {
|
|
575
|
+
this._dialogRef.close(data);
|
|
576
|
+
}
|
|
577
|
+
};
|
|
578
|
+
FsAclEntryComponent.ctorParameters = () => [
|
|
579
|
+
{ type: FsAppAclService },
|
|
580
|
+
{ type: MatDialogRef },
|
|
581
|
+
{ type: FsMessage },
|
|
582
|
+
{ type: undefined, decorators: [{ type: Inject, args: [MAT_DIALOG_DATA,] }] }
|
|
583
|
+
];
|
|
584
|
+
FsAclEntryComponent = __decorate([
|
|
585
|
+
Component({
|
|
586
|
+
template: "<form fsForm [submit]=\"save\">\n <fs-dialog>\n <div mat-dialog-title>{{ titleEdit? titleEdit : titleAdd }}</div>\n <mat-dialog-content>\n <div *ngIf=\"aclObjectRole\">\n <fs-label-field *ngIf=\"aclObjectEntry.object\">\n <fs-label>{{indexedAclRoleLevels[aclObjectEntry.level]}}</fs-label>\n {{aclObjectEntry.object.name}}\n </fs-label-field>\n\n <fs-acl-object-roles\n [aclRoles]=\"aclRoles\"\n [aclObjectRoles]=\"[aclObjectRole]\"\n [required]=\"required\"\n (change)=\"aclObjectRoleChange($event)\">\n </fs-acl-object-roles>\n </div>\n </mat-dialog-content>\n <mat-dialog-actions>\n <button mat-button type=\"submit\" color=\"primary\">Save</button>\n <button mat-button mat-dialog-close type=\"button\">Cancel</button>\n </mat-dialog-actions>\n </fs-dialog>\n</form>\n",
|
|
587
|
+
styles: ["::ng-deep .account-roles-autocomplete-panel .mat-option{line-height:normal}::ng-deep .account-roles-autocomplete-panel .mat-option .mat-option-text{display:flex;flex-direction:row;align-items:center}::ng-deep .account-roles-autocomplete-panel .mat-option .mat-option-text fs-badge{margin-right:5px}"]
|
|
588
|
+
}),
|
|
589
|
+
__param(3, Inject(MAT_DIALOG_DATA)),
|
|
590
|
+
__metadata("design:paramtypes", [FsAppAclService,
|
|
591
|
+
MatDialogRef,
|
|
592
|
+
FsMessage, Object])
|
|
593
593
|
], FsAclEntryComponent);
|
|
594
594
|
|
|
595
|
-
let FsAclEntriesComponent = class FsAclEntriesComponent {
|
|
596
|
-
constructor(_appAclService, _dialog, _confirm) {
|
|
597
|
-
this._appAclService = _appAclService;
|
|
598
|
-
this._dialog = _dialog;
|
|
599
|
-
this._confirm = _confirm;
|
|
600
|
-
this.
|
|
601
|
-
this.
|
|
602
|
-
this.
|
|
603
|
-
this.
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
this.
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
}
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
}
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
.
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
this.
|
|
715
|
-
}
|
|
716
|
-
};
|
|
717
|
-
FsAclEntriesComponent.ctorParameters = () => [
|
|
718
|
-
{ type: FsAppAclService },
|
|
719
|
-
{ type: MatDialog },
|
|
720
|
-
{ type: FsPrompt }
|
|
721
|
-
];
|
|
722
|
-
__decorate([
|
|
723
|
-
Input(),
|
|
724
|
-
__metadata("design:type", Function)
|
|
725
|
-
], FsAclEntriesComponent.prototype, "loadAclEntries", void 0);
|
|
726
|
-
__decorate([
|
|
727
|
-
Input(),
|
|
728
|
-
__metadata("design:type", Function)
|
|
729
|
-
], FsAclEntriesComponent.prototype, "loadAclRoles", void 0);
|
|
730
|
-
__decorate([
|
|
731
|
-
Input(),
|
|
732
|
-
__metadata("design:type", Function)
|
|
733
|
-
], FsAclEntriesComponent.prototype, "saveAclObjectEntry", void 0);
|
|
734
|
-
__decorate([
|
|
735
|
-
|
|
736
|
-
__metadata("design:type",
|
|
737
|
-
], FsAclEntriesComponent.prototype, "
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
__metadata("design:
|
|
745
|
-
|
|
746
|
-
|
|
595
|
+
let FsAclEntriesComponent = class FsAclEntriesComponent {
|
|
596
|
+
constructor(_appAclService, _dialog, _confirm) {
|
|
597
|
+
this._appAclService = _appAclService;
|
|
598
|
+
this._dialog = _dialog;
|
|
599
|
+
this._confirm = _confirm;
|
|
600
|
+
this.environmentShow = true;
|
|
601
|
+
this.environmentLabel = 'Environment';
|
|
602
|
+
this.actions = [];
|
|
603
|
+
this.aclEntriesList = null;
|
|
604
|
+
this.aclEntriesConfig = null;
|
|
605
|
+
this.permissions = [];
|
|
606
|
+
this._destroy$ = new Subject();
|
|
607
|
+
}
|
|
608
|
+
ngOnInit() {
|
|
609
|
+
this._appAclService.getPermissions()
|
|
610
|
+
.subscribe(response => {
|
|
611
|
+
this.permissions = response;
|
|
612
|
+
});
|
|
613
|
+
this.aclEntriesConfig = {
|
|
614
|
+
status: false,
|
|
615
|
+
paging: false,
|
|
616
|
+
actions: this.actions,
|
|
617
|
+
rowActions: [
|
|
618
|
+
{
|
|
619
|
+
label: 'Remove All Roles',
|
|
620
|
+
click: (aclObjectEntry) => {
|
|
621
|
+
this._confirm
|
|
622
|
+
.confirm({
|
|
623
|
+
title: 'Remove All Roles',
|
|
624
|
+
template: 'Are you sure you would like to remove all roles?',
|
|
625
|
+
}).subscribe(() => {
|
|
626
|
+
const data = this._appAclService.output(Object.assign(Object.assign({}, aclObjectEntry), { aclEntries: [] }));
|
|
627
|
+
this.saveAclObjectEntry(data)
|
|
628
|
+
.subscribe(() => {
|
|
629
|
+
this.aclEntriesList.reload();
|
|
630
|
+
});
|
|
631
|
+
});
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
],
|
|
635
|
+
fetch: () => {
|
|
636
|
+
return new Observable((observer) => {
|
|
637
|
+
this.loadAclEntries({
|
|
638
|
+
aclRoles: true,
|
|
639
|
+
aclRolePermissions: true,
|
|
640
|
+
objects: true,
|
|
641
|
+
aclRoleState: 'active',
|
|
642
|
+
})
|
|
643
|
+
.pipe(map((response) => this._appAclService.input(response)))
|
|
644
|
+
.subscribe((aclEntries) => {
|
|
645
|
+
const objects = aclEntries.reduce((items, item) => {
|
|
646
|
+
if (item.object) {
|
|
647
|
+
items[item.object.id] = item.object;
|
|
648
|
+
}
|
|
649
|
+
return items;
|
|
650
|
+
}, {});
|
|
651
|
+
const environments = aclEntries.reduce((items, item) => {
|
|
652
|
+
if (item.environment) {
|
|
653
|
+
items[item.environment.id] = item.environment;
|
|
654
|
+
}
|
|
655
|
+
return items;
|
|
656
|
+
}, {});
|
|
657
|
+
let aclObjectEntry = [];
|
|
658
|
+
const grouped = groupBy(aclEntries, (item) => {
|
|
659
|
+
return [item.aclRole.level, item.environmentId, item.objectId];
|
|
660
|
+
});
|
|
661
|
+
forOwn(grouped, (group, key) => {
|
|
662
|
+
key = key.split(',');
|
|
663
|
+
aclObjectEntry.push({
|
|
664
|
+
object: objects[key[2]],
|
|
665
|
+
level: key[0],
|
|
666
|
+
environmentId: key[1] ? parseInt(key[1]) : null,
|
|
667
|
+
environment: environments[key[1]],
|
|
668
|
+
aclEntries: group,
|
|
669
|
+
});
|
|
670
|
+
});
|
|
671
|
+
const hasApp = aclObjectEntry.some((item) => {
|
|
672
|
+
return item.aclEntries.some((entry) => {
|
|
673
|
+
return !entry.objectId;
|
|
674
|
+
});
|
|
675
|
+
});
|
|
676
|
+
if (!hasApp) {
|
|
677
|
+
aclObjectEntry.unshift({
|
|
678
|
+
object: null, aclEntries: [],
|
|
679
|
+
level: 'app',
|
|
680
|
+
environmentId: null,
|
|
681
|
+
});
|
|
682
|
+
}
|
|
683
|
+
aclObjectEntry = sortBy(aclObjectEntry, (item) => {
|
|
684
|
+
return item.object ? item.level : '';
|
|
685
|
+
});
|
|
686
|
+
observer.next({ data: aclObjectEntry });
|
|
687
|
+
observer.complete();
|
|
688
|
+
});
|
|
689
|
+
});
|
|
690
|
+
},
|
|
691
|
+
};
|
|
692
|
+
}
|
|
693
|
+
update(aclObjectEntry) {
|
|
694
|
+
const data = {
|
|
695
|
+
aclObjectEntry: aclObjectEntry,
|
|
696
|
+
required: false,
|
|
697
|
+
loadAclRoles: this.loadAclRoles,
|
|
698
|
+
saveAclObjectEntry: this.saveAclObjectEntry
|
|
699
|
+
};
|
|
700
|
+
this._dialog.open(FsAclEntryComponent, {
|
|
701
|
+
data: data
|
|
702
|
+
})
|
|
703
|
+
.afterClosed()
|
|
704
|
+
.pipe(takeUntil(this._destroy$))
|
|
705
|
+
.subscribe(() => {
|
|
706
|
+
this.aclEntriesList.reload();
|
|
707
|
+
});
|
|
708
|
+
}
|
|
709
|
+
ngOnDestroy() {
|
|
710
|
+
this._destroy$.next();
|
|
711
|
+
this._destroy$.complete();
|
|
712
|
+
}
|
|
713
|
+
reload() {
|
|
714
|
+
this.aclEntriesList.reload();
|
|
715
|
+
}
|
|
716
|
+
};
|
|
717
|
+
FsAclEntriesComponent.ctorParameters = () => [
|
|
718
|
+
{ type: FsAppAclService },
|
|
719
|
+
{ type: MatDialog },
|
|
720
|
+
{ type: FsPrompt }
|
|
721
|
+
];
|
|
722
|
+
__decorate([
|
|
723
|
+
Input(),
|
|
724
|
+
__metadata("design:type", Function)
|
|
725
|
+
], FsAclEntriesComponent.prototype, "loadAclEntries", void 0);
|
|
726
|
+
__decorate([
|
|
727
|
+
Input(),
|
|
728
|
+
__metadata("design:type", Function)
|
|
729
|
+
], FsAclEntriesComponent.prototype, "loadAclRoles", void 0);
|
|
730
|
+
__decorate([
|
|
731
|
+
Input(),
|
|
732
|
+
__metadata("design:type", Function)
|
|
733
|
+
], FsAclEntriesComponent.prototype, "saveAclObjectEntry", void 0);
|
|
734
|
+
__decorate([
|
|
735
|
+
Input(),
|
|
736
|
+
__metadata("design:type", Object)
|
|
737
|
+
], FsAclEntriesComponent.prototype, "environmentShow", void 0);
|
|
738
|
+
__decorate([
|
|
739
|
+
Input(),
|
|
740
|
+
__metadata("design:type", Object)
|
|
741
|
+
], FsAclEntriesComponent.prototype, "environmentLabel", void 0);
|
|
742
|
+
__decorate([
|
|
743
|
+
Input(),
|
|
744
|
+
__metadata("design:type", Array)
|
|
745
|
+
], FsAclEntriesComponent.prototype, "actions", void 0);
|
|
746
|
+
__decorate([
|
|
747
|
+
ViewChild(FsListComponent),
|
|
748
|
+
__metadata("design:type", FsListComponent)
|
|
749
|
+
], FsAclEntriesComponent.prototype, "aclEntriesList", void 0);
|
|
750
|
+
FsAclEntriesComponent = __decorate([
|
|
751
|
+
Component({
|
|
752
|
+
selector: 'fs-acl-entries',
|
|
753
|
+
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",
|
|
754
|
+
styles: [""]
|
|
755
|
+
}),
|
|
756
|
+
__metadata("design:paramtypes", [FsAppAclService,
|
|
757
|
+
MatDialog,
|
|
758
|
+
FsPrompt])
|
|
747
759
|
], FsAclEntriesComponent);
|
|
748
760
|
|
|
749
|
-
let FsAclObjectRolesComponent = class FsAclObjectRolesComponent {
|
|
750
|
-
constructor() {
|
|
751
|
-
this.aclRoles = [];
|
|
752
|
-
this.required = false;
|
|
753
|
-
this.multiple = false;
|
|
754
|
-
this.disabled = false;
|
|
755
|
-
this.aclObjectRoles = [];
|
|
756
|
-
this.rolesLabel = 'Roles';
|
|
757
|
-
this.levelLabel = '';
|
|
758
|
-
this.change = new EventEmitter();
|
|
759
|
-
this.compareAclRole = (o1, o2) => {
|
|
760
|
-
return o1 && o2 && o1.id === o2.id;
|
|
761
|
-
};
|
|
762
|
-
}
|
|
763
|
-
changed() {
|
|
764
|
-
this.change.emit(this.aclObjectRoles);
|
|
765
|
-
}
|
|
766
|
-
};
|
|
767
|
-
__decorate([
|
|
768
|
-
Input(),
|
|
769
|
-
__metadata("design:type", Array)
|
|
770
|
-
], FsAclObjectRolesComponent.prototype, "aclRoles", void 0);
|
|
771
|
-
__decorate([
|
|
772
|
-
Input(),
|
|
773
|
-
__metadata("design:type", Object)
|
|
774
|
-
], FsAclObjectRolesComponent.prototype, "required", void 0);
|
|
775
|
-
__decorate([
|
|
776
|
-
Input(),
|
|
777
|
-
__metadata("design:type", Object)
|
|
778
|
-
], FsAclObjectRolesComponent.prototype, "multiple", void 0);
|
|
779
|
-
__decorate([
|
|
780
|
-
Input(),
|
|
781
|
-
__metadata("design:type", Object)
|
|
782
|
-
], FsAclObjectRolesComponent.prototype, "disabled", void 0);
|
|
783
|
-
__decorate([
|
|
784
|
-
Input(),
|
|
785
|
-
__metadata("design:type", Array)
|
|
786
|
-
], FsAclObjectRolesComponent.prototype, "aclObjectRoles", void 0);
|
|
787
|
-
__decorate([
|
|
788
|
-
Input(),
|
|
789
|
-
__metadata("design:type", Object)
|
|
790
|
-
], FsAclObjectRolesComponent.prototype, "rolesLabel", void 0);
|
|
791
|
-
__decorate([
|
|
792
|
-
Input(),
|
|
793
|
-
__metadata("design:type", Object)
|
|
794
|
-
], FsAclObjectRolesComponent.prototype, "levelLabel", void 0);
|
|
795
|
-
__decorate([
|
|
796
|
-
Output(),
|
|
797
|
-
__metadata("design:type", Object)
|
|
798
|
-
], FsAclObjectRolesComponent.prototype, "change", void 0);
|
|
799
|
-
FsAclObjectRolesComponent = __decorate([
|
|
800
|
-
Component({
|
|
801
|
-
selector: 'fs-acl-object-roles',
|
|
802
|
-
template: "<ng-container *ngIf=\"!multiple\">\n <ng-container *ngFor=\"let aclObjectRole of aclObjectRoles\">\n <fs-checkbox-group\n [(ngModel)]=\"aclObjectRole.aclRoles\"\n (ngModelChange)=\"changed()\"\n name=\"roles\"\n [compareWith]=\"compareAclRole\"\n [disabled]=\"disabled\"\n [label]=\"rolesLabel\"\n [fsFormRequired]=\"required\"\n orientation=\"vertical\">\n <mat-checkbox [disabled]=\"disabled\" *ngFor=\"let aclRole of aclRoles\" [value]=\"aclRole\">\n {{ aclRole.name }}\n </mat-checkbox>\n </fs-checkbox-group>\n </ng-container>\n</ng-container>\n\n<ng-container *ngIf=\"multiple\">\n <table>\n <tr>\n <td>\n <small>{{levelLabel}}</small>\n </td>\n <td>\n <small>{{rolesLabel}}</small>\n </td>\n </tr>\n <tr *ngFor=\"let aclObjectRole of aclObjectRoles\">\n <td>{{aclObjectRole.object.name}}</td>\n <td>\n <mat-form-field class=\"form-field-padless\">\n <mat-select\n [(ngModel)]=\"aclObjectRole.aclRoles\"\n multiple=\"true\"\n [disabled]=\"disabled\"\n [compareWith]=\"compareAclRole\"\n (ngModelChange)=\"changed()\"\n name=\"aclRole_{{ aclObjectRole.object.id }}\">\n <mat-option *ngFor=\"let aclRole of aclRoles\" [value]=\"aclRole\">\n {{ aclRole.name }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n </td>\n </tr>\n </table>\n</ng-container>\n",
|
|
803
|
-
viewProviders: [{ provide: ControlContainer, useExisting: NgForm }],
|
|
804
|
-
styles: ["table tr td:first-child{padding-right:15px}"]
|
|
805
|
-
})
|
|
761
|
+
let FsAclObjectRolesComponent = class FsAclObjectRolesComponent {
|
|
762
|
+
constructor() {
|
|
763
|
+
this.aclRoles = [];
|
|
764
|
+
this.required = false;
|
|
765
|
+
this.multiple = false;
|
|
766
|
+
this.disabled = false;
|
|
767
|
+
this.aclObjectRoles = [];
|
|
768
|
+
this.rolesLabel = 'Roles';
|
|
769
|
+
this.levelLabel = '';
|
|
770
|
+
this.change = new EventEmitter();
|
|
771
|
+
this.compareAclRole = (o1, o2) => {
|
|
772
|
+
return o1 && o2 && o1.id === o2.id;
|
|
773
|
+
};
|
|
774
|
+
}
|
|
775
|
+
changed() {
|
|
776
|
+
this.change.emit(this.aclObjectRoles);
|
|
777
|
+
}
|
|
778
|
+
};
|
|
779
|
+
__decorate([
|
|
780
|
+
Input(),
|
|
781
|
+
__metadata("design:type", Array)
|
|
782
|
+
], FsAclObjectRolesComponent.prototype, "aclRoles", void 0);
|
|
783
|
+
__decorate([
|
|
784
|
+
Input(),
|
|
785
|
+
__metadata("design:type", Object)
|
|
786
|
+
], FsAclObjectRolesComponent.prototype, "required", void 0);
|
|
787
|
+
__decorate([
|
|
788
|
+
Input(),
|
|
789
|
+
__metadata("design:type", Object)
|
|
790
|
+
], FsAclObjectRolesComponent.prototype, "multiple", void 0);
|
|
791
|
+
__decorate([
|
|
792
|
+
Input(),
|
|
793
|
+
__metadata("design:type", Object)
|
|
794
|
+
], FsAclObjectRolesComponent.prototype, "disabled", void 0);
|
|
795
|
+
__decorate([
|
|
796
|
+
Input(),
|
|
797
|
+
__metadata("design:type", Array)
|
|
798
|
+
], FsAclObjectRolesComponent.prototype, "aclObjectRoles", void 0);
|
|
799
|
+
__decorate([
|
|
800
|
+
Input(),
|
|
801
|
+
__metadata("design:type", Object)
|
|
802
|
+
], FsAclObjectRolesComponent.prototype, "rolesLabel", void 0);
|
|
803
|
+
__decorate([
|
|
804
|
+
Input(),
|
|
805
|
+
__metadata("design:type", Object)
|
|
806
|
+
], FsAclObjectRolesComponent.prototype, "levelLabel", void 0);
|
|
807
|
+
__decorate([
|
|
808
|
+
Output(),
|
|
809
|
+
__metadata("design:type", Object)
|
|
810
|
+
], FsAclObjectRolesComponent.prototype, "change", void 0);
|
|
811
|
+
FsAclObjectRolesComponent = __decorate([
|
|
812
|
+
Component({
|
|
813
|
+
selector: 'fs-acl-object-roles',
|
|
814
|
+
template: "<ng-container *ngIf=\"!multiple\">\n <ng-container *ngFor=\"let aclObjectRole of aclObjectRoles\">\n <fs-checkbox-group\n [(ngModel)]=\"aclObjectRole.aclRoles\"\n (ngModelChange)=\"changed()\"\n name=\"roles\"\n [compareWith]=\"compareAclRole\"\n [disabled]=\"disabled\"\n [label]=\"rolesLabel\"\n [fsFormRequired]=\"required\"\n orientation=\"vertical\">\n <mat-checkbox [disabled]=\"disabled\" *ngFor=\"let aclRole of aclRoles\" [value]=\"aclRole\">\n {{ aclRole.name }}\n </mat-checkbox>\n </fs-checkbox-group>\n </ng-container>\n</ng-container>\n\n<ng-container *ngIf=\"multiple\">\n <table>\n <tr>\n <td>\n <small>{{levelLabel}}</small>\n </td>\n <td>\n <small>{{rolesLabel}}</small>\n </td>\n </tr>\n <tr *ngFor=\"let aclObjectRole of aclObjectRoles\">\n <td>{{aclObjectRole.object.name}}</td>\n <td>\n <mat-form-field class=\"form-field-padless\">\n <mat-select\n [(ngModel)]=\"aclObjectRole.aclRoles\"\n multiple=\"true\"\n [disabled]=\"disabled\"\n [compareWith]=\"compareAclRole\"\n (ngModelChange)=\"changed()\"\n name=\"aclRole_{{ aclObjectRole.object.id }}\">\n <mat-option *ngFor=\"let aclRole of aclRoles\" [value]=\"aclRole\">\n {{ aclRole.name }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n </td>\n </tr>\n </table>\n</ng-container>\n",
|
|
815
|
+
viewProviders: [{ provide: ControlContainer, useExisting: NgForm }],
|
|
816
|
+
styles: ["table tr td:first-child{padding-right:15px}"]
|
|
817
|
+
})
|
|
806
818
|
], FsAclObjectRolesComponent);
|
|
807
819
|
|
|
808
|
-
var FsAppAclModule_1;
|
|
809
|
-
let FsAppAclModule = FsAppAclModule_1 = class FsAppAclModule {
|
|
810
|
-
static forRoot() {
|
|
811
|
-
return {
|
|
812
|
-
ngModule: FsAppAclModule_1,
|
|
813
|
-
};
|
|
814
|
-
}
|
|
815
|
-
};
|
|
816
|
-
FsAppAclModule = FsAppAclModule_1 = __decorate([
|
|
817
|
-
NgModule({
|
|
818
|
-
imports: [
|
|
819
|
-
CommonModule,
|
|
820
|
-
FormsModule,
|
|
821
|
-
MatDialogModule,
|
|
822
|
-
MatFormFieldModule,
|
|
823
|
-
MatCheckboxModule,
|
|
824
|
-
MatSelectModule,
|
|
825
|
-
MatButtonModule,
|
|
826
|
-
MatRadioModule,
|
|
827
|
-
MatInputModule,
|
|
828
|
-
FlexLayoutModule,
|
|
829
|
-
FsListModule,
|
|
830
|
-
FsPopoverModule,
|
|
831
|
-
FsDialogModule,
|
|
832
|
-
FsFormModule,
|
|
833
|
-
FsLabelModule,
|
|
834
|
-
FsRadioGroupModule,
|
|
835
|
-
FsBadgeModule,
|
|
836
|
-
FsCheckboxGroupModule,
|
|
837
|
-
],
|
|
838
|
-
declarations: [
|
|
839
|
-
FsAclRolesComponent,
|
|
840
|
-
FsAclPermissionPopoverComponent,
|
|
841
|
-
FsAclRoleComponent,
|
|
842
|
-
FsAclEntriesComponent,
|
|
843
|
-
FsAclRolePopoverComponent,
|
|
844
|
-
FsAclObjectRolesComponent,
|
|
845
|
-
FsAclEntryComponent,
|
|
846
|
-
],
|
|
847
|
-
exports: [
|
|
848
|
-
FsAclRolesComponent,
|
|
849
|
-
FsAclPermissionPopoverComponent,
|
|
850
|
-
FsAclRoleComponent,
|
|
851
|
-
FsAclEntriesComponent,
|
|
852
|
-
FsAclRolePopoverComponent,
|
|
853
|
-
FsAclObjectRolesComponent,
|
|
854
|
-
FsAclEntryComponent,
|
|
855
|
-
],
|
|
856
|
-
entryComponents: [
|
|
857
|
-
FsAclRoleComponent
|
|
858
|
-
]
|
|
859
|
-
})
|
|
820
|
+
var FsAppAclModule_1;
|
|
821
|
+
let FsAppAclModule = FsAppAclModule_1 = class FsAppAclModule {
|
|
822
|
+
static forRoot() {
|
|
823
|
+
return {
|
|
824
|
+
ngModule: FsAppAclModule_1,
|
|
825
|
+
};
|
|
826
|
+
}
|
|
827
|
+
};
|
|
828
|
+
FsAppAclModule = FsAppAclModule_1 = __decorate([
|
|
829
|
+
NgModule({
|
|
830
|
+
imports: [
|
|
831
|
+
CommonModule,
|
|
832
|
+
FormsModule,
|
|
833
|
+
MatDialogModule,
|
|
834
|
+
MatFormFieldModule,
|
|
835
|
+
MatCheckboxModule,
|
|
836
|
+
MatSelectModule,
|
|
837
|
+
MatButtonModule,
|
|
838
|
+
MatRadioModule,
|
|
839
|
+
MatInputModule,
|
|
840
|
+
FlexLayoutModule,
|
|
841
|
+
FsListModule,
|
|
842
|
+
FsPopoverModule,
|
|
843
|
+
FsDialogModule,
|
|
844
|
+
FsFormModule,
|
|
845
|
+
FsLabelModule,
|
|
846
|
+
FsRadioGroupModule,
|
|
847
|
+
FsBadgeModule,
|
|
848
|
+
FsCheckboxGroupModule,
|
|
849
|
+
],
|
|
850
|
+
declarations: [
|
|
851
|
+
FsAclRolesComponent,
|
|
852
|
+
FsAclPermissionPopoverComponent,
|
|
853
|
+
FsAclRoleComponent,
|
|
854
|
+
FsAclEntriesComponent,
|
|
855
|
+
FsAclRolePopoverComponent,
|
|
856
|
+
FsAclObjectRolesComponent,
|
|
857
|
+
FsAclEntryComponent,
|
|
858
|
+
],
|
|
859
|
+
exports: [
|
|
860
|
+
FsAclRolesComponent,
|
|
861
|
+
FsAclPermissionPopoverComponent,
|
|
862
|
+
FsAclRoleComponent,
|
|
863
|
+
FsAclEntriesComponent,
|
|
864
|
+
FsAclRolePopoverComponent,
|
|
865
|
+
FsAclObjectRolesComponent,
|
|
866
|
+
FsAclEntryComponent,
|
|
867
|
+
],
|
|
868
|
+
entryComponents: [
|
|
869
|
+
FsAclRoleComponent
|
|
870
|
+
]
|
|
871
|
+
})
|
|
860
872
|
], FsAppAclModule);
|
|
861
873
|
|
|
862
|
-
// start:ng42.barrel
|
|
874
|
+
// start:ng42.barrel
|
|
863
875
|
// end:ng42.barrel
|
|
864
876
|
|
|
865
|
-
/**
|
|
866
|
-
* Generated bundle index. Do not edit.
|
|
877
|
+
/**
|
|
878
|
+
* Generated bundle index. Do not edit.
|
|
867
879
|
*/
|
|
868
880
|
|
|
869
|
-
export { FS_APP_ACL_CONFIG, FsAclRolesComponent, FsAppAclModule, FsAppAclService, FsAppAclService as ɵa, FsAclPermissionPopoverComponent as ɵb, FsAclRoleComponent as ɵc,
|
|
881
|
+
export { FS_APP_ACL_CONFIG, FsAclEntriesComponent, FsAclRolesComponent, FsAppAclModule, FsAppAclService, FsAppAclService as ɵa, FsAclPermissionPopoverComponent as ɵb, FsAclRoleComponent as ɵc, FsAclRolePopoverComponent as ɵd, FsAclObjectRolesComponent as ɵe, FsAclEntryComponent as ɵf };
|
|
870
882
|
//# sourceMappingURL=firestitch-app-acl.js.map
|