@huntsman-cancer-institute/user 12.5.0 → 14.1.0

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.
Files changed (42) hide show
  1. package/authorization/role-check-unless-null.directive.d.ts +1 -1
  2. package/authorization/role-check.directive.d.ts +1 -1
  3. package/esm2020/authorization/permission.entity.mjs +45 -0
  4. package/esm2020/authorization/role-check-unless-null.directive.mjs +62 -0
  5. package/esm2020/authorization/role-check.directive.mjs +66 -0
  6. package/{esm5/authorization/role.entity.js → esm2020/authorization/role.entity.mjs} +23 -33
  7. package/esm2020/huntsman-cancer-institute-user.mjs +5 -0
  8. package/esm2020/index.mjs +20 -0
  9. package/esm2020/user.entity.mjs +70 -0
  10. package/esm2020/user.module.mjs +53 -0
  11. package/esm2020/user.service.mjs +98 -0
  12. package/fesm2015/huntsman-cancer-institute-user.mjs +422 -0
  13. package/fesm2015/huntsman-cancer-institute-user.mjs.map +1 -0
  14. package/{fesm2015/huntsman-cancer-institute-user.js → fesm2020/huntsman-cancer-institute-user.mjs} +22 -23
  15. package/fesm2020/huntsman-cancer-institute-user.mjs.map +1 -0
  16. package/package.json +24 -16
  17. package/CHANGELOG.md +0 -4
  18. package/bundles/huntsman-cancer-institute-user.umd.js +0 -500
  19. package/bundles/huntsman-cancer-institute-user.umd.js.map +0 -1
  20. package/bundles/huntsman-cancer-institute-user.umd.min.js +0 -2
  21. package/bundles/huntsman-cancer-institute-user.umd.min.js.map +0 -1
  22. package/esm2015/authorization/permission.entity.js +0 -45
  23. package/esm2015/authorization/role-check-unless-null.directive.js +0 -62
  24. package/esm2015/authorization/role-check.directive.js +0 -66
  25. package/esm2015/authorization/role.entity.js +0 -32
  26. package/esm2015/huntsman-cancer-institute-user.js +0 -5
  27. package/esm2015/index.js +0 -20
  28. package/esm2015/user.entity.js +0 -70
  29. package/esm2015/user.module.js +0 -55
  30. package/esm2015/user.service.js +0 -98
  31. package/esm5/authorization/permission.entity.js +0 -59
  32. package/esm5/authorization/role-check-unless-null.directive.js +0 -87
  33. package/esm5/authorization/role-check.directive.js +0 -73
  34. package/esm5/huntsman-cancer-institute-user.js +0 -5
  35. package/esm5/index.js +0 -20
  36. package/esm5/user.entity.js +0 -96
  37. package/esm5/user.module.js +0 -59
  38. package/esm5/user.service.js +0 -101
  39. package/fesm2015/huntsman-cancer-institute-user.js.map +0 -1
  40. package/fesm5/huntsman-cancer-institute-user.js +0 -499
  41. package/fesm5/huntsman-cancer-institute-user.js.map +0 -1
  42. package/huntsman-cancer-institute-user.d.ts +0 -5
@@ -1,499 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { InjectionToken, isDevMode, ɵɵngDeclareFactory, ɵɵFactoryTarget, ɵɵngDeclareInjectable, ɵɵngDeclareClassMetadata, Injectable, Inject, ViewContainerRef, TemplateRef, ɵɵngDeclareDirective, Directive, Input, ɵɵngDeclareNgModule, ɵɵngDeclareInjector, NgModule } from '@angular/core';
3
- import { CommonModule } from '@angular/common';
4
- import { ReactiveFormsModule, FormsModule } from '@angular/forms';
5
- import { HttpHeaders, HttpClient } from '@angular/common/http';
6
- import { of, Observable } from 'rxjs';
7
- import { map, catchError } from 'rxjs/operators';
8
-
9
- /**
10
- * An immutable representation of an HCI user entity.
11
- *
12
- * @since 1.0.0
13
- */
14
- var UserEntity = /** @class */ (function () {
15
- function UserEntity(id, username, roles, firstname, lastname, href) {
16
- this.id = id;
17
- this.username = username;
18
- this.roles = roles;
19
- this.firstname = firstname;
20
- this.lastname = lastname;
21
- this.href = href;
22
- }
23
- Object.defineProperty(UserEntity.prototype, "Id", {
24
- /**
25
- * An accessor for the users system id.
26
- *
27
- * @returns {string} the system id
28
- * @constructor
29
- */
30
- get: function () {
31
- return this.id;
32
- },
33
- enumerable: false,
34
- configurable: true
35
- });
36
- Object.defineProperty(UserEntity.prototype, "Username", {
37
- /**
38
- * An accessor for the users application identifier/username.
39
- *
40
- * @returns {string} the application id/username
41
- * @constructor
42
- */
43
- get: function () {
44
- return this.username;
45
- },
46
- enumerable: false,
47
- configurable: true
48
- });
49
- Object.defineProperty(UserEntity.prototype, "Roles", {
50
- /**
51
- * An accessor for the users assigned role authorization claims.
52
- *
53
- * @returns {@code RoleEntity[]} the role authorization claims
54
- * @constructor
55
- */
56
- get: function () {
57
- return this.roles;
58
- },
59
- enumerable: false,
60
- configurable: true
61
- });
62
- Object.defineProperty(UserEntity.prototype, "Firstname", {
63
- /**
64
- * An accessor for the users firstname.
65
- *
66
- * @return {string} the firstname
67
- * @constructor
68
- */
69
- get: function () {
70
- return this.firstname;
71
- },
72
- enumerable: false,
73
- configurable: true
74
- });
75
- Object.defineProperty(UserEntity.prototype, "Lastname", {
76
- /**
77
- * A accessor for the users lastname.
78
- *
79
- * @return {string} the lastname
80
- * @constructor
81
- */
82
- get: function () {
83
- return this.lastname;
84
- },
85
- enumerable: false,
86
- configurable: true
87
- });
88
- Object.defineProperty(UserEntity.prototype, "Href", {
89
- /**
90
- * A access for the users fully qualified href location on the system.
91
- *
92
- * @return {string} the href location
93
- * @constructor
94
- */
95
- get: function () {
96
- return this.href;
97
- },
98
- enumerable: false,
99
- configurable: true
100
- });
101
- return UserEntity;
102
- }());
103
-
104
- /**
105
- * An immutable representation of an HCI role entity, which represents an authorization claim associated with an authenticated
106
- * subject.
107
- *
108
- * @since 1.0.0
109
- */
110
- var RoleEntity = /** @class */ (function () {
111
- function RoleEntity(roleName, permissions) {
112
- this.roleName = roleName;
113
- this.permissions = permissions;
114
- }
115
- Object.defineProperty(RoleEntity.prototype, "RoleName", {
116
- /**
117
- * An accessor for the name of this role.
118
- *
119
- * @returns {string} the role name
120
- * @constructor
121
- */
122
- get: function () {
123
- return this.roleName;
124
- },
125
- enumerable: false,
126
- configurable: true
127
- });
128
- Object.defineProperty(RoleEntity.prototype, "Permissions", {
129
- /**
130
- * An accessor for a collection of {@link PermissionEntity} authorization claims that define this role. Permissions
131
- * provide a finer grained authorization claim description and are not required.
132
- *
133
- * @returns {PermissionEntity[]} a collection of permission entities
134
- * @constructor
135
- */
136
- get: function () {
137
- return this.permissions;
138
- },
139
- enumerable: false,
140
- configurable: true
141
- });
142
- return RoleEntity;
143
- }());
144
-
145
- /*
146
- * Copyright (c) 2016 Huntsman Cancer Institute at the University of Utah, Confidential and Proprietary
147
- */
148
- /**
149
- * An immutable representation of an HCI permission entity, which represents a fine grained authorization claim that can
150
- * define a {@link RoleEntity}.
151
- *
152
- * @since 1.0.0
153
- */
154
- var PermissionEntity = /** @class */ (function () {
155
- function PermissionEntity(domain, actions, instances) {
156
- this.domain = domain;
157
- this.actions = actions;
158
- this.instances = instances;
159
- }
160
- Object.defineProperty(PermissionEntity.prototype, "Domain", {
161
- /**
162
- * An accessor for the domain this permission is defined for (i.e. user, study, specimen, etc...).
163
- *
164
- * @returns {string} the domain of this permission
165
- * @constructor
166
- */
167
- get: function () {
168
- return this.domain;
169
- },
170
- enumerable: false,
171
- configurable: true
172
- });
173
- Object.defineProperty(PermissionEntity.prototype, "Actions", {
174
- /**
175
- * An accessor for the actions that this permission allows in the specified domain (i.e. create, read, activate, manage
176
- * etc...). If no actions are defined, this permission claims access to all actions of the specified domain.
177
- *
178
- * @returns {string[]} an array of actions for the specified domain
179
- * @constructor
180
- */
181
- get: function () {
182
- return this.actions;
183
- },
184
- enumerable: false,
185
- configurable: true
186
- });
187
- Object.defineProperty(PermissionEntity.prototype, "Instances", {
188
- /**
189
- * An accessor for the instances that this permission is applicable to in the specified domain (i.e. joe, 1234, study-foo,
190
- * etc...). If no instances are defined, this permission claims applicability to all instances of the specified domain.
191
- * @returns {string[]}
192
- * @constructor
193
- */
194
- get: function () {
195
- return this.instances;
196
- },
197
- enumerable: false,
198
- configurable: true
199
- });
200
- return PermissionEntity;
201
- }());
202
-
203
- /*
204
- * Copyright (c) 2016 Huntsman Cancer Institute at the University of Utah, Confidential and Proprietary
205
- */
206
- var AUTHENTICATED_USER_ENDPOINT = new InjectionToken("authenticated_user_url");
207
- /**
208
- * @since 1.0.0
209
- */
210
- var UserService = /** @class */ (function () {
211
- function UserService(_http, _authenticationUserEndpoint) {
212
- this._http = _http;
213
- this._authenticationUserEndpoint = _authenticationUserEndpoint;
214
- this._authenticatedUser = null;
215
- }
216
- /**
217
- * An accessor for an {@code Observable<UserEntity>} reflecting the currently authenticated user. If no subject is
218
- * available, the appropriate response status should be returned from the server to indicate that condition
219
- * (i.e. 404 - Not Found).
220
- *
221
- * @returns {Observable<UserEntity>} the currently authenticated user representation
222
- */
223
- UserService.prototype.getAuthenticatedUser = function () {
224
- var _this = this;
225
- if (isDevMode() && console && console.debug) {
226
- console.debug("getAuthenticatedUser");
227
- }
228
- if (!this._authenticatedUser) {
229
- if (isDevMode() && console && console.debug) {
230
- console.debug("_authenticationUserEndpoint: " + this._authenticationUserEndpoint);
231
- }
232
- return this._http.get(this._authenticationUserEndpoint, { observe: "response" }).pipe(map(function (resp) {
233
- if (resp.status === 200) {
234
- _this._authenticatedUser = _this.buildUserEntity(resp.body);
235
- return _this._authenticatedUser;
236
- }
237
- else {
238
- throw new Error("Get authenticated user failed. " + resp.status + ": " + resp.statusText);
239
- }
240
- }), catchError(this.handleError));
241
- }
242
- else {
243
- return of(this._authenticatedUser);
244
- }
245
- };
246
- UserService.prototype.handleError = function (error) {
247
- var errMsg = (error.message) ? error.message : UserService.GENERIC_ERR_MSG;
248
- return Observable.throw(errMsg);
249
- };
250
- /**
251
- * TODO: Add in a deserializer into the entity.
252
- *
253
- * @param userJson
254
- * @returns {UserEntity}
255
- */
256
- UserService.prototype.buildUserEntity = function (userJson) {
257
- var roles = [];
258
- if (userJson.roles) {
259
- userJson.roles.map(function (role) {
260
- var permissions;
261
- if (role.permissions) {
262
- /* TODO: JEH (10/27/16) - Revisit when we determine how permission are communicated to the client, if necessary */
263
- permissions = role.permissions.map(function (permission) {
264
- return new PermissionEntity(permission.domain, permission.actions, permission.instances);
265
- });
266
- }
267
- roles.push(new RoleEntity(role.roleName, permissions));
268
- });
269
- }
270
- return new UserEntity(userJson.idUser, userJson.username, roles, userJson.firstname, userJson.lastname, userJson.href);
271
- };
272
- UserService.prototype.getPermissions = function (governorClass, governorId, governedClass) {
273
- var headers = new HttpHeaders()
274
- .set("SecurityGovernorClass", governorClass).set("SecurityGovernorId", String(governorId));
275
- return this._http.get("/core/api/user/permissions/" + governedClass, { headers: headers });
276
- };
277
- /**
278
- * The generic error message used when a server error is thrown without a status.
279
- *
280
- * @type {string}
281
- */
282
- UserService.GENERIC_ERR_MSG = "Server error";
283
- UserService.ɵfac = ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: UserService, deps: [{ token: HttpClient }, { token: AUTHENTICATED_USER_ENDPOINT }], target: ɵɵFactoryTarget.Injectable });
284
- UserService.ɵprov = ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: UserService });
285
- return UserService;
286
- }());
287
- ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: UserService, decorators: [{
288
- type: Injectable
289
- }], ctorParameters: function () { return [{ type: HttpClient }, { type: undefined, decorators: [{
290
- type: Inject,
291
- args: [AUTHENTICATED_USER_ENDPOINT]
292
- }] }]; } });
293
-
294
- /*
295
- * Copyright (c) 2016 Huntsman Cancer Institute at the University of Utah, Confidential and Proprietary
296
- */
297
- /**
298
- * A structural directive for adding and removing elements of the client application based on a users <em>role</em>
299
- * authorization claims.
300
- *
301
- * This directive requires the {@link UserService} as a provider.
302
- *
303
- * @since 1.0.0
304
- */
305
- var RoleCheckDirective = /** @class */ (function () {
306
- function RoleCheckDirective(_viewContainer, _templateRef, _usrSvc) {
307
- this._viewContainer = _viewContainer;
308
- this._templateRef = _templateRef;
309
- this._usrSvc = _usrSvc;
310
- this._lastCheck = null;
311
- }
312
- Object.defineProperty(RoleCheckDirective.prototype, "hciHasRole", {
313
- /**
314
- * Calculates the availability of a decorated element based on the authenticated users available roles.
315
- *
316
- * @param roleName for the role required to make the decorated element available
317
- */
318
- set: function (roleName) {
319
- var _this = this;
320
- if (isDevMode() && console && console.debug) {
321
- console.debug("hciHasRole");
322
- }
323
- this._usrSvc.getAuthenticatedUser().subscribe(function (authUser) {
324
- var found;
325
- if (authUser && authUser.Roles) {
326
- found = authUser.Roles.some(function (role) {
327
- return role.RoleName === roleName;
328
- });
329
- }
330
- else {
331
- found = false;
332
- }
333
- if (found && (_this._lastCheck === null || !_this._lastCheck)) {
334
- _this._viewContainer.createEmbeddedView(_this._templateRef);
335
- }
336
- else if (!found && (_this._lastCheck === null || _this._lastCheck)) {
337
- _this._viewContainer.clear();
338
- }
339
- }, function (error) {
340
- // TODO: BHY (08/19/16) - Determine requirements around errors and then REMOVE CONSOLE LOGGING. Display to user,
341
- // log to external source, gobble?
342
- // Gobble up the error.
343
- });
344
- },
345
- enumerable: false,
346
- configurable: true
347
- });
348
- RoleCheckDirective.ɵfac = ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: RoleCheckDirective, deps: [{ token: ViewContainerRef }, { token: TemplateRef }, { token: UserService }], target: ɵɵFactoryTarget.Directive });
349
- RoleCheckDirective.ɵdir = ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: RoleCheckDirective, selector: "[hciHasRole]", inputs: { hciHasRole: "hciHasRole" }, providers: [UserService], ngImport: i0 });
350
- return RoleCheckDirective;
351
- }());
352
- ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: RoleCheckDirective, decorators: [{
353
- type: Directive,
354
- args: [{
355
- selector: "[hciHasRole]",
356
- providers: [UserService]
357
- }]
358
- }], ctorParameters: function () { return [{ type: ViewContainerRef }, { type: TemplateRef }, { type: UserService }]; }, propDecorators: { hciHasRole: [{
359
- type: Input
360
- }] } });
361
-
362
- var __extends = (this && this.__extends) || (function () {
363
- var extendStatics = function (d, b) {
364
- extendStatics = Object.setPrototypeOf ||
365
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
366
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
367
- return extendStatics(d, b);
368
- };
369
- return function (d, b) {
370
- if (typeof b !== "function" && b !== null)
371
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
372
- extendStatics(d, b);
373
- function __() { this.constructor = d; }
374
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
375
- };
376
- })();
377
- /**
378
- * An extension of the {@link RoleCheckDirective} the only evaluates the role if is it not null or undefined.
379
- *
380
- * This directive requires the {@link UserService} as a provider.
381
- *
382
- * @since 1.0.0
383
- */
384
- var RoleCheckUnlessNullDirective = /** @class */ (function (_super) {
385
- __extends(RoleCheckUnlessNullDirective, _super);
386
- function RoleCheckUnlessNullDirective(_viewContainer, _templateRef, _usrSvc) {
387
- var _this = _super.call(this, _viewContainer, _templateRef, _usrSvc) || this;
388
- _this._context = new HciHasRoleUnlessNullContext();
389
- return _this;
390
- }
391
- Object.defineProperty(RoleCheckUnlessNullDirective.prototype, "hciHasRoleUnlessNull", {
392
- set: function (roleName) {
393
- if (!roleName) {
394
- // if the roleName is undefined or null then render
395
- if (this._context._condition !== true) {
396
- this._context._condition = true;
397
- this._updateView();
398
- }
399
- }
400
- else {
401
- // otherwise delegate the check to RoleCheckDirective
402
- this.hciHasRole = roleName;
403
- }
404
- },
405
- enumerable: false,
406
- configurable: true
407
- });
408
- RoleCheckUnlessNullDirective.prototype._updateView = function () {
409
- this._viewContainer.clear();
410
- if (this._context._condition) {
411
- this._viewContainer.createEmbeddedView(this._templateRef, this._context);
412
- }
413
- else {
414
- this._viewContainer.createEmbeddedView(this._templateRef, this._context);
415
- }
416
- };
417
- RoleCheckUnlessNullDirective.ɵfac = ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: RoleCheckUnlessNullDirective, deps: [{ token: ViewContainerRef }, { token: TemplateRef }, { token: UserService }], target: ɵɵFactoryTarget.Directive });
418
- RoleCheckUnlessNullDirective.ɵdir = ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: RoleCheckUnlessNullDirective, selector: "[hciHasRoleUnlessNull]", inputs: { hciHasRoleUnlessNull: "hciHasRoleUnlessNull" }, usesInheritance: true, ngImport: i0 });
419
- return RoleCheckUnlessNullDirective;
420
- }(RoleCheckDirective));
421
- ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: RoleCheckUnlessNullDirective, decorators: [{
422
- type: Directive,
423
- args: [{
424
- selector: "[hciHasRoleUnlessNull]"
425
- }]
426
- }], ctorParameters: function () { return [{ type: ViewContainerRef }, { type: TemplateRef }, { type: UserService }]; }, propDecorators: { hciHasRoleUnlessNull: [{
427
- type: Input
428
- }] } });
429
- /**
430
- * I totally ripped off *ngIf source to get this to work correctly to prevent infinit loop rendering.
431
- */
432
- var HciHasRoleUnlessNullContext = /** @class */ (function () {
433
- function HciHasRoleUnlessNullContext() {
434
- this._condition = false;
435
- }
436
- return HciHasRoleUnlessNullContext;
437
- }());
438
-
439
- /*
440
- * Copyright (c) 2016 Huntsman Cancer Institute at the University of Utah, Confidential and Proprietary
441
- */
442
- /**
443
- * A feature module for user related services, directives, pipes, etc...
444
- *
445
- * @since 1.0.0
446
- */
447
- var UserModule = /** @class */ (function () {
448
- function UserModule() {
449
- }
450
- UserModule.forRoot = function () {
451
- return {
452
- providers: [
453
- UserService
454
- ],
455
- ngModule: UserModule
456
- };
457
- };
458
- UserModule.ɵfac = ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: UserModule, deps: [], target: ɵɵFactoryTarget.NgModule });
459
- UserModule.ɵmod = ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: UserModule, declarations: [RoleCheckDirective,
460
- RoleCheckUnlessNullDirective], imports: [CommonModule,
461
- ReactiveFormsModule,
462
- FormsModule], exports: [RoleCheckDirective,
463
- RoleCheckUnlessNullDirective] });
464
- UserModule.ɵinj = ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: UserModule, imports: [[
465
- CommonModule,
466
- ReactiveFormsModule,
467
- FormsModule
468
- ]] });
469
- return UserModule;
470
- }());
471
- ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: UserModule, decorators: [{
472
- type: NgModule,
473
- args: [{
474
- imports: [
475
- CommonModule,
476
- ReactiveFormsModule,
477
- FormsModule
478
- ],
479
- declarations: [
480
- RoleCheckDirective,
481
- RoleCheckUnlessNullDirective
482
- ],
483
- exports: [
484
- RoleCheckDirective,
485
- RoleCheckUnlessNullDirective
486
- ]
487
- }]
488
- }] });
489
-
490
- /*
491
- * Copyright (c) 2016 Huntsman Cancer Institute at the University of Utah, Confidential and Proprietary
492
- */
493
-
494
- /**
495
- * Generated bundle index. Do not edit.
496
- */
497
-
498
- export { AUTHENTICATED_USER_ENDPOINT, PermissionEntity, RoleCheckDirective, RoleCheckUnlessNullDirective, RoleEntity, UserEntity, UserModule, UserService };
499
- //# sourceMappingURL=huntsman-cancer-institute-user.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"huntsman-cancer-institute-user.js","sources":["ng://@huntsman-cancer-institute/user/user.entity.ts","ng://@huntsman-cancer-institute/user/authorization/role.entity.ts","ng://@huntsman-cancer-institute/user/authorization/permission.entity.ts","ng://@huntsman-cancer-institute/user/user.service.ts","ng://@huntsman-cancer-institute/user/authorization/role-check.directive.ts","ng://@huntsman-cancer-institute/user/authorization/role-check-unless-null.directive.ts","ng://@huntsman-cancer-institute/user/user.module.ts","ng://@huntsman-cancer-institute/user/index.ts","ng://@huntsman-cancer-institute/user/huntsman-cancer-institute-user.ts"],"sourcesContent":["/*\r\n * Copyright (c) 2016 Huntsman Cancer Institute at the University of Utah, Confidential and Proprietary\r\n */\r\nimport {RoleEntity} from \"./authorization/role.entity\";\r\n\r\n/**\r\n * An immutable representation of an HCI user entity.\r\n *\r\n * @since 1.0.0\r\n */\r\nexport class UserEntity {\r\n constructor(private id: string,\r\n private username: string,\r\n private roles?: RoleEntity[],\r\n private firstname?: string,\r\n private lastname?: string,\r\n private href?: string) {\r\n }\r\n\r\n /**\r\n * An accessor for the users system id.\r\n *\r\n * @returns {string} the system id\r\n * @constructor\r\n */\r\n get Id(): string {\r\n return this.id;\r\n }\r\n\r\n /**\r\n * An accessor for the users application identifier/username.\r\n *\r\n * @returns {string} the application id/username\r\n * @constructor\r\n */\r\n get Username(): string {\r\n return this.username;\r\n }\r\n\r\n /**\r\n * An accessor for the users assigned role authorization claims.\r\n *\r\n * @returns {@code RoleEntity[]} the role authorization claims\r\n * @constructor\r\n */\r\n get Roles(): RoleEntity[] {\r\n return this.roles;\r\n }\r\n\r\n /**\r\n * An accessor for the users firstname.\r\n *\r\n * @return {string} the firstname\r\n * @constructor\r\n */\r\n get Firstname(): string {\r\n return this.firstname;\r\n }\r\n\r\n /**\r\n * A accessor for the users lastname.\r\n *\r\n * @return {string} the lastname\r\n * @constructor\r\n */\r\n get Lastname(): string {\r\n return this.lastname;\r\n }\r\n\r\n /**\r\n * A access for the users fully qualified href location on the system.\r\n *\r\n * @return {string} the href location\r\n * @constructor\r\n */\r\n get Href(): string {\r\n return this.href;\r\n }\r\n\r\n}\r\n","/*\r\n * Copyright (c) 2016 Huntsman Cancer Institute at the University of Utah, Confidential and Proprietary\r\n */\r\nimport {PermissionEntity} from \"./permission.entity\";\r\n\r\n/**\r\n * An immutable representation of an HCI role entity, which represents an authorization claim associated with an authenticated\r\n * subject.\r\n *\r\n * @since 1.0.0\r\n */\r\nexport class RoleEntity {\r\n constructor( private roleName: string, private permissions?: PermissionEntity[]) {}\r\n\r\n /**\r\n * An accessor for the name of this role.\r\n *\r\n * @returns {string} the role name\r\n * @constructor\r\n */\r\n get RoleName(): string {\r\n return this.roleName;\r\n }\r\n\r\n /**\r\n * An accessor for a collection of {@link PermissionEntity} authorization claims that define this role. Permissions\r\n * provide a finer grained authorization claim description and are not required.\r\n *\r\n * @returns {PermissionEntity[]} a collection of permission entities\r\n * @constructor\r\n */\r\n get Permissions(): PermissionEntity[] {\r\n return this.permissions;\r\n }\r\n}\r\n","/*\r\n * Copyright (c) 2016 Huntsman Cancer Institute at the University of Utah, Confidential and Proprietary\r\n */\r\n/**\r\n * An immutable representation of an HCI permission entity, which represents a fine grained authorization claim that can\r\n * define a {@link RoleEntity}.\r\n *\r\n * @since 1.0.0\r\n */\r\nexport class PermissionEntity {\r\n constructor(private domain: string, private actions?: string[], private instances?: string[]) {\r\n }\r\n\r\n /**\r\n * An accessor for the domain this permission is defined for (i.e. user, study, specimen, etc...).\r\n *\r\n * @returns {string} the domain of this permission\r\n * @constructor\r\n */\r\n get Domain(): string {\r\n return this.domain;\r\n }\r\n\r\n /**\r\n * An accessor for the actions that this permission allows in the specified domain (i.e. create, read, activate, manage\r\n * etc...). If no actions are defined, this permission claims access to all actions of the specified domain.\r\n *\r\n * @returns {string[]} an array of actions for the specified domain\r\n * @constructor\r\n */\r\n get Actions(): string[] {\r\n return this.actions;\r\n }\r\n\r\n /**\r\n * An accessor for the instances that this permission is applicable to in the specified domain (i.e. joe, 1234, study-foo,\r\n * etc...). If no instances are defined, this permission claims applicability to all instances of the specified domain.\r\n * @returns {string[]}\r\n * @constructor\r\n */\r\n get Instances(): string[] {\r\n return this.instances;\r\n }\r\n}\r\n","/*\r\n * Copyright (c) 2016 Huntsman Cancer Institute at the University of Utah, Confidential and Proprietary\r\n */\r\nimport {Injectable, InjectionToken, Inject, isDevMode} from \"@angular/core\";\r\nimport {HttpClient, HttpResponse, HttpHeaders} from \"@angular/common/http\";\r\n\r\nimport {Observable, of} from \"rxjs\";\r\nimport {catchError, map} from \"rxjs/operators\";\r\n\r\nimport {UserEntity} from \"./user.entity\";\r\nimport {RoleEntity} from \"./authorization/role.entity\";\r\nimport {PermissionEntity} from \"./authorization/permission.entity\";\r\n\r\nexport let AUTHENTICATED_USER_ENDPOINT = new InjectionToken<string>(\"authenticated_user_url\");\r\n\r\n/**\r\n * @since 1.0.0\r\n */\r\n@Injectable()\r\nexport class UserService {\r\n /**\r\n * The generic error message used when a server error is thrown without a status.\r\n *\r\n * @type {string}\r\n */\r\n public static GENERIC_ERR_MSG: string = \"Server error\";\r\n\r\n private _authenticatedUser: UserEntity = null;\r\n\r\n constructor(private _http: HttpClient, @Inject(AUTHENTICATED_USER_ENDPOINT) private _authenticationUserEndpoint: string) {}\r\n\r\n /**\r\n * An accessor for an {@code Observable<UserEntity>} reflecting the currently authenticated user. If no subject is\r\n * available, the appropriate response status should be returned from the server to indicate that condition\r\n * (i.e. 404 - Not Found).\r\n *\r\n * @returns {Observable<UserEntity>} the currently authenticated user representation\r\n */\r\n public getAuthenticatedUser(): Observable<UserEntity> {\r\n if (isDevMode() && <any>console && <any>console.debug) {\r\n console.debug(\"getAuthenticatedUser\");\r\n }\r\n\r\n if (!this._authenticatedUser) {\r\n if (isDevMode() && <any>console && <any>console.debug) {\r\n console.debug(\"_authenticationUserEndpoint: \" + this._authenticationUserEndpoint);\r\n }\r\n\r\n return this._http.get(this._authenticationUserEndpoint, { observe: \"response\" }).pipe(map((resp: HttpResponse<any>) => {\r\n if (resp.status === 200) {\r\n this._authenticatedUser = this.buildUserEntity(resp.body);\r\n return this._authenticatedUser;\r\n } else {\r\n throw new Error(\"Get authenticated user failed. \" + resp.status + \": \" + resp.statusText);\r\n }\r\n }),\r\n catchError(this.handleError));\r\n } else {\r\n return of(this._authenticatedUser);\r\n }\r\n }\r\n\r\n private handleError(error: any) {\r\n let errMsg = (error.message) ? error.message : UserService.GENERIC_ERR_MSG;\r\n\r\n return Observable.throw(errMsg);\r\n }\r\n\r\n /**\r\n * TODO: Add in a deserializer into the entity.\r\n *\r\n * @param userJson\r\n * @returns {UserEntity}\r\n */\r\n private buildUserEntity(userJson: any): UserEntity {\r\n let roles: RoleEntity[] = [];\r\n if (userJson.roles) {\r\n userJson.roles.map((role: any) => {\r\n let permissions: PermissionEntity[];\r\n if (role.permissions) {\r\n /* TODO: JEH (10/27/16) - Revisit when we determine how permission are communicated to the client, if necessary */\r\n permissions = role.permissions.map((permission: any) => {\r\n return new PermissionEntity(permission.domain, permission.actions, permission.instances);\r\n });\r\n }\r\n roles.push(new RoleEntity(role.roleName, permissions));\r\n });\r\n }\r\n\r\n return new UserEntity(userJson.idUser, userJson.username, roles, userJson.firstname, userJson.lastname, userJson.href);\r\n }\r\n \r\n public getPermissions(governorClass: string, governorId: number, governedClass: string): Observable<any> {\r\n let headers = new HttpHeaders()\r\n .set(\"SecurityGovernorClass\", governorClass).set(\"SecurityGovernorId\", String(governorId));\r\n return this._http.get(\"/core/api/user/permissions/\" + governedClass, {headers: headers});\r\n }\r\n}\r\n","/*\r\n * Copyright (c) 2016 Huntsman Cancer Institute at the University of Utah, Confidential and Proprietary\r\n */\r\nimport {Directive, Input, TemplateRef, ViewContainerRef, isDevMode} from \"@angular/core\";\r\n\r\nimport {UserService} from \"../user.service\";\r\nimport {UserEntity} from \"../user.entity\";\r\n\r\n/**\r\n * A structural directive for adding and removing elements of the client application based on a users <em>role</em>\r\n * authorization claims.\r\n *\r\n * This directive requires the {@link UserService} as a provider.\r\n *\r\n * @since 1.0.0\r\n */\r\n@Directive({\r\n selector: \"[hciHasRole]\",\r\n providers: [UserService]\r\n})\r\nexport class RoleCheckDirective {\r\n protected _lastCheck: boolean = null;\r\n\r\n constructor(protected _viewContainer: ViewContainerRef,\r\n protected _templateRef: TemplateRef<Object>,\r\n protected _usrSvc: UserService) {\r\n }\r\n\r\n /**\r\n * Calculates the availability of a decorated element based on the authenticated users available roles.\r\n *\r\n * @param roleName for the role required to make the decorated element available\r\n */\r\n @Input()\r\n set hciHasRole(roleName: string) {\r\n if (isDevMode() && <any>console && <any>console.debug) {\r\n console.debug(\"hciHasRole\");\r\n }\r\n\r\n this._usrSvc.getAuthenticatedUser().subscribe((authUser: UserEntity) => {\r\n let found: boolean;\r\n\r\n if (authUser && authUser.Roles) {\r\n found = authUser.Roles.some((role) => {\r\n return role.RoleName === roleName;\r\n });\r\n } else {\r\n found = false;\r\n }\r\n\r\n if (found && (this._lastCheck === null || !this._lastCheck)) {\r\n this._viewContainer.createEmbeddedView(this._templateRef);\r\n } else if (!found && (this._lastCheck === null || this._lastCheck)) {\r\n this._viewContainer.clear();\r\n }\r\n }, (error) => {\r\n // TODO: BHY (08/19/16) - Determine requirements around errors and then REMOVE CONSOLE LOGGING. Display to user,\r\n // log to external source, gobble?\r\n // Gobble up the error.\r\n });\r\n }\r\n}\r\n\r\n","/*\r\n * Copyright (c) 2016 Huntsman Cancer Institute at the University of Utah, Confidential and Proprietary\r\n */\r\nimport {Directive, Input, ViewContainerRef, TemplateRef} from \"@angular/core\";\r\nimport {RoleCheckDirective} from \"./role-check.directive\";\r\nimport {UserService} from \"../user.service\";\r\n\r\n/**\r\n * An extension of the {@link RoleCheckDirective} the only evaluates the role if is it not null or undefined.\r\n *\r\n * This directive requires the {@link UserService} as a provider.\r\n *\r\n * @since 1.0.0\r\n */\r\n@Directive({\r\n selector: \"[hciHasRoleUnlessNull]\"\r\n})\r\nexport class RoleCheckUnlessNullDirective extends RoleCheckDirective {\r\n\r\n private _context: HciHasRoleUnlessNullContext = new HciHasRoleUnlessNullContext();\r\n\r\n constructor(\r\n _viewContainer: ViewContainerRef,\r\n _templateRef: TemplateRef<Object>,\r\n _usrSvc: UserService) {\r\n super(_viewContainer, _templateRef, _usrSvc);\r\n }\r\n\r\n @Input()\r\n set hciHasRoleUnlessNull(roleName: string) {\r\n if (!roleName) {\r\n // if the roleName is undefined or null then render\r\n if (this._context._condition !== true) {\r\n this._context._condition = true;\r\n this._updateView();\r\n }\r\n } else {\r\n // otherwise delegate the check to RoleCheckDirective\r\n this.hciHasRole = roleName;\r\n }\r\n }\r\n\r\n private _updateView() {\r\n this._viewContainer.clear();\r\n if (this._context._condition) {\r\n this._viewContainer.createEmbeddedView(this._templateRef, this._context);\r\n } else {\r\n this._viewContainer.createEmbeddedView(this._templateRef, this._context);\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * I totally ripped off *ngIf source to get this to work correctly to prevent infinit loop rendering.\r\n */\r\nexport class HciHasRoleUnlessNullContext {\r\n public _condition: boolean = false;\r\n}\r\n","/*\r\n * Copyright (c) 2016 Huntsman Cancer Institute at the University of Utah, Confidential and Proprietary\r\n */\r\nimport {ModuleWithProviders, NgModule} from \"@angular/core\";\r\nimport {CommonModule} from \"@angular/common\";\r\nimport {ReactiveFormsModule, FormsModule} from \"@angular/forms\";\r\n\r\nimport {UserService} from \"./user.service\";\r\nimport {RoleCheckDirective} from \"./authorization/role-check.directive\";\r\nimport {RoleCheckUnlessNullDirective} from \"./authorization/role-check-unless-null.directive\";\r\n\r\n/**\r\n * A feature module for user related services, directives, pipes, etc...\r\n *\r\n * @since 1.0.0\r\n */\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n ReactiveFormsModule,\r\n FormsModule\r\n ],\r\n declarations: [\r\n RoleCheckDirective,\r\n RoleCheckUnlessNullDirective\r\n ],\r\n exports: [\r\n RoleCheckDirective,\r\n RoleCheckUnlessNullDirective\r\n ]\r\n})\r\nexport class UserModule {\r\n static forRoot(): ModuleWithProviders<UserModule> {\r\n return {\r\n providers: [\r\n UserService\r\n ],\r\n ngModule: UserModule\r\n };\r\n }\r\n}\r\n","/*\r\n * Copyright (c) 2016 Huntsman Cancer Institute at the University of Utah, Confidential and Proprietary\r\n */\r\n\r\n/**\r\n * A barrel file for the HCI ng2 user package.\r\n *\r\n * @since 1.0.0\r\n */\r\nexport {UserModule} from \"./user.module\"\r\nexport {UserEntity} from \"./user.entity\"\r\nexport {RoleEntity} from \"./authorization/role.entity\"\r\nexport {PermissionEntity} from \"./authorization/permission.entity\"\r\n\r\n/**\r\n * The opaque tokens for service configuration.\r\n */\r\nexport {\r\n AUTHENTICATED_USER_ENDPOINT\r\n} from \"./user.service\"\r\n\r\nexport {UserService} from \"./user.service\"\r\n\r\nexport {RoleCheckDirective} from \"./authorization/role-check.directive\";\r\nexport {RoleCheckUnlessNullDirective} from \"./authorization/role-check-unless-null.directive\";\r\n\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAKA;;;;;;IAME,oBAAoB,EAAU,EACV,QAAgB,EAChB,KAAoB,EACpB,SAAkB,EAClB,QAAiB,EACjB,IAAa;QALb,OAAE,GAAF,EAAE,CAAQ;QACV,aAAQ,GAAR,QAAQ,CAAQ;QAChB,UAAK,GAAL,KAAK,CAAe;QACpB,cAAS,GAAT,SAAS,CAAS;QAClB,aAAQ,GAAR,QAAQ,CAAS;QACjB,SAAI,GAAJ,IAAI,CAAS;KAChC;IAQD,sBAAI,0BAAE;;;;;;;aAAN;YACE,OAAO,IAAI,CAAC,EAAE,CAAC;SAChB;;;OAAA;IAQD,sBAAI,gCAAQ;;;;;;;aAAZ;YACE,OAAO,IAAI,CAAC,QAAQ,CAAC;SACtB;;;OAAA;IAQD,sBAAI,6BAAK;;;;;;;aAAT;YACE,OAAO,IAAI,CAAC,KAAK,CAAC;SACnB;;;OAAA;IAQD,sBAAI,iCAAS;;;;;;;aAAb;YACE,OAAO,IAAI,CAAC,SAAS,CAAC;SACvB;;;OAAA;IAQD,sBAAI,gCAAQ;;;;;;;aAAZ;YACE,OAAO,IAAI,CAAC,QAAQ,CAAC;SACtB;;;OAAA;IAQD,sBAAI,4BAAI;;;;;;;aAAR;YACE,OAAO,IAAI,CAAC,IAAI,CAAC;SAClB;;;OAAA;IAEH,iBAAC;AAAD,CAAC;;AC1ED;;;;;;;IAOE,oBAAqB,QAAgB,EAAU,WAAgC;QAA1D,aAAQ,GAAR,QAAQ,CAAQ;QAAU,gBAAW,GAAX,WAAW,CAAqB;KAAI;IAQnF,sBAAI,gCAAQ;;;;;;;aAAZ;YACE,OAAO,IAAI,CAAC,QAAQ,CAAC;SACtB;;;OAAA;IASD,sBAAI,mCAAW;;;;;;;;aAAf;YACE,OAAO,IAAI,CAAC,WAAW,CAAC;SAC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B;wBAClB,4BAA4B;qBAC7B;iBACF;;;AC9BD;;;;ACAA;;;;;;"}
@@ -1,5 +0,0 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- /// <amd-module name="@huntsman-cancer-institute/user" />
5
- export * from './index';