@tomei/sso 0.38.1 → 0.38.4

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.1",
3
+ "version": "0.38.4",
4
4
  "description": "Tomei SSO Package",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -181,7 +181,7 @@ export class Group extends TreeNodeBase<Group> {
181
181
 
182
182
  async setParent(parent: Group, dbTransaction?: any): Promise<void> {
183
183
  this.parent = parent;
184
- await this.getPath(dbTransaction);
184
+ await this.updatePath(dbTransaction);
185
185
  }
186
186
 
187
187
  async getPathDetail(dbTransaction?: any): Promise<Group[]> {
@@ -486,7 +486,7 @@ export class Group extends TreeNodeBase<Group> {
486
486
  ParentGroupCode: currentGroup.ParentGroupCode,
487
487
  InheritParentPrivilegeYN: currentGroup.InheritParentPrivilegeYN,
488
488
  InheritParentSystemAccessYN: currentGroup.InheritParentSystemAccessYN,
489
- Path: this.Path,
489
+ Path: currentGroup.Path,
490
490
  Status: currentGroup.Status,
491
491
  CreatedById: currentGroup._CreatedById,
492
492
  UpdatedById: currentGroup._UpdatedById,
@@ -527,7 +527,7 @@ export class Group extends TreeNodeBase<Group> {
527
527
  }
528
528
 
529
529
  if (isPathChanged) {
530
- await this.updateChildrenPath(oldGroupCode, dbTransaction);
530
+ await currentGroup.updateChildrenPath(oldGroupCode, dbTransaction);
531
531
  }
532
532
 
533
533
  currentGroup.Name = group?.Name || currentGroup.Name;
@@ -555,6 +555,7 @@ export class Group extends TreeNodeBase<Group> {
555
555
  InheritParentPrivilegeYN: currentGroup.InheritParentPrivilegeYN,
556
556
  InheritParentSystemAccessYN: currentGroup.InheritParentSystemAccessYN,
557
557
  Status: currentGroup.Status,
558
+ Path: currentGroup._Path,
558
559
  UpdatedById: currentGroup._UpdatedById,
559
560
  UpdatedAt: currentGroup._UpdatedAt,
560
561
  },
@@ -575,6 +576,7 @@ export class Group extends TreeNodeBase<Group> {
575
576
  InheritParentPrivilegeYN: currentGroup.InheritParentPrivilegeYN,
576
577
  InheritParentSystemAccessYN: currentGroup.InheritParentSystemAccessYN,
577
578
  Status: currentGroup.Status,
579
+ Path: currentGroup._Path,
578
580
  CreatedById: currentGroup._CreatedById,
579
581
  UpdatedById: currentGroup._UpdatedById,
580
582
  CreatedAt: currentGroup._CreatedAt,
@@ -12,13 +12,13 @@ export class GroupPrivilegeRepository
12
12
 
13
13
  async delete(
14
14
  GroupCode: string,
15
- PrivilegeCode: string,
15
+ SystemPrivilegeId: string,
16
16
  SystemCode: string,
17
17
  dbTransaction?: any,
18
18
  ) {
19
19
  try {
20
20
  const data = await GroupPrivilegeModel.findOne({
21
- where: { GroupCode, PrivilegeCode },
21
+ where: { GroupCode, SystemPrivilegeId },
22
22
  include: [
23
23
  {
24
24
  model: SystemPrivilegeModel,
@@ -36,7 +36,7 @@ export default class GroupObjectPrivilegeModel extends Model {
36
36
 
37
37
  @ForeignKey(() => SystemPrivilegeModel)
38
38
  @Column({
39
- type: DataType.STRING(10),
39
+ type: DataType.STRING(30),
40
40
  allowNull: false,
41
41
  })
42
42
  SystemPrivilegeId: string;
@@ -35,7 +35,7 @@ export default class GroupPrivilegeModel extends Model {
35
35
 
36
36
  @ForeignKey(() => SystemPrivilegeModel)
37
37
  @Column({
38
- type: DataType.STRING(10),
38
+ type: DataType.STRING(30),
39
39
  allowNull: false,
40
40
  })
41
41
  SystemPrivilegeId: string;
@@ -35,7 +35,7 @@ export default class UserObjectPrivilegeModel extends Model {
35
35
 
36
36
  @ForeignKey(() => SystemPrivilegeModel)
37
37
  @Column({
38
- type: DataType.STRING(10),
38
+ type: DataType.STRING(30),
39
39
  allowNull: false,
40
40
  })
41
41
  SystemPrivilegeId: string;
@@ -36,7 +36,7 @@ export default class UserPrivilegeModel extends Model {
36
36
  @ForeignKey(() => SystemPrivilegeModel)
37
37
  @Column({
38
38
  primaryKey: true,
39
- type: DataType.STRING(10),
39
+ type: DataType.STRING(30),
40
40
  allowNull: false,
41
41
  })
42
42
  SystemPrivilegeId: string;