@tomei/sso 0.38.0 → 0.38.1

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.1",
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> {
@@ -176,7 +181,7 @@ export class Group extends TreeNodeBase<Group> {
176
181
 
177
182
  async setParent(parent: Group, dbTransaction?: any): Promise<void> {
178
183
  this.parent = parent;
179
- await this.updatePath(dbTransaction);
184
+ await this.getPath(dbTransaction);
180
185
  }
181
186
 
182
187
  async getPathDetail(dbTransaction?: any): Promise<Group[]> {
@@ -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,