@tomei/sso 0.38.0 → 0.38.2

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tomei/sso",
3
- "version": "0.38.0",
3
+ "version": "0.38.2",
4
4
  "description": "Tomei SSO Package",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -72,6 +72,10 @@ export class Group extends TreeNodeBase<Group> {
72
72
  return this._UpdatedAt;
73
73
  }
74
74
 
75
+ set Path(value: string) {
76
+ this._Path = value;
77
+ }
78
+
75
79
  private constructor(groupAttr?: IGroupAttr) {
76
80
  super();
77
81
  if (groupAttr) {
@@ -163,10 +167,11 @@ export class Group extends TreeNodeBase<Group> {
163
167
  }
164
168
 
165
169
  if (this.parent) {
166
- return (await this.parent.getPath(dbTransaction)) + '/' + this.Name;
170
+ this._Path = (await this.parent.getPath(dbTransaction)) + '/' + this.Name;
171
+ return this._Path;
167
172
  }
168
-
169
- return this.GroupCode;
173
+ this._Path = this.GroupCode;
174
+ return this._Path;
170
175
  }
171
176
 
172
177
  protected async updatePath(dbTransaction?: any): Promise<void> {
@@ -355,6 +360,7 @@ export class Group extends TreeNodeBase<Group> {
355
360
  ParentGroupCode: newGroup.ParentGroupCode,
356
361
  InheritParentPrivilegeYN: newGroup.InheritParentPrivilegeYN,
357
362
  InheritParentSystemAccessYN: newGroup.InheritParentSystemAccessYN,
363
+ Path: newGroup._Path,
358
364
  Status: newGroup.Status,
359
365
  CreatedById: newGroup._CreatedById,
360
366
  UpdatedById: newGroup._UpdatedById,
@@ -521,7 +527,7 @@ export class Group extends TreeNodeBase<Group> {
521
527
  }
522
528
 
523
529
  if (isPathChanged) {
524
- await this.updateChildrenPath(oldGroupCode, dbTransaction);
530
+ await currentGroup.updateChildrenPath(oldGroupCode, dbTransaction);
525
531
  }
526
532
 
527
533
  currentGroup.Name = group?.Name || currentGroup.Name;
@@ -549,6 +555,7 @@ export class Group extends TreeNodeBase<Group> {
549
555
  InheritParentPrivilegeYN: currentGroup.InheritParentPrivilegeYN,
550
556
  InheritParentSystemAccessYN: currentGroup.InheritParentSystemAccessYN,
551
557
  Status: currentGroup.Status,
558
+ Path: currentGroup._Path,
552
559
  UpdatedById: currentGroup._UpdatedById,
553
560
  UpdatedAt: currentGroup._UpdatedAt,
554
561
  },