Merge branch 'develop' into develop-Bright
This commit is contained in:
commit
7bb199d254
2 changed files with 17 additions and 2 deletions
|
|
@ -81,7 +81,8 @@ export class AuthRoleController extends Controller {
|
||||||
roleName: string;
|
roleName: string;
|
||||||
roleDescription: string;
|
roleDescription: string;
|
||||||
authRoleAttrs: Array<{
|
authRoleAttrs: Array<{
|
||||||
id: string;
|
// id: string;
|
||||||
|
authSysId: string;
|
||||||
attrOwnership: string;
|
attrOwnership: string;
|
||||||
attrIsCreate: boolean;
|
attrIsCreate: boolean;
|
||||||
attrIsList: boolean;
|
attrIsList: boolean;
|
||||||
|
|
@ -89,6 +90,7 @@ export class AuthRoleController extends Controller {
|
||||||
attrIsUpdate: boolean;
|
attrIsUpdate: boolean;
|
||||||
attrIsDelete: boolean;
|
attrIsDelete: boolean;
|
||||||
attrPrivilege: string;
|
attrPrivilege: string;
|
||||||
|
parentNode: string;
|
||||||
}>;
|
}>;
|
||||||
},
|
},
|
||||||
) {
|
) {
|
||||||
|
|
@ -99,6 +101,8 @@ export class AuthRoleController extends Controller {
|
||||||
...attr,
|
...attr,
|
||||||
attrOwnership: attr.attrOwnership.toUpperCase(),
|
attrOwnership: attr.attrOwnership.toUpperCase(),
|
||||||
attrPrivilege: attr.attrPrivilege.toUpperCase(),
|
attrPrivilege: attr.attrPrivilege.toUpperCase(),
|
||||||
|
authSysId: attr.authSysId.toUpperCase(),
|
||||||
|
parentNode: attr.parentNode.toUpperCase(),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
Object.assign(record, {
|
Object.assign(record, {
|
||||||
|
|
@ -112,7 +116,7 @@ export class AuthRoleController extends Controller {
|
||||||
});
|
});
|
||||||
|
|
||||||
const updatedRoleAttrData = roleAttrData.map((attr) => {
|
const updatedRoleAttrData = roleAttrData.map((attr) => {
|
||||||
const updatedAttr = body.authRoleAttrs.find((a) => a.id === attr.id);
|
const updatedAttr = body.authRoleAttrs.find((a) => a.authSysId === attr.authSysId);
|
||||||
if (updatedAttr) {
|
if (updatedAttr) {
|
||||||
return Object.assign(attr, updatedAttr, { lastUpdateFullName: req.user.name });
|
return Object.assign(attr, updatedAttr, { lastUpdateFullName: req.user.name });
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -67,6 +67,14 @@ export class AuthRoleAttr extends EntityBase {
|
||||||
})
|
})
|
||||||
authSysId: string;
|
authSysId: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
length: 255,
|
||||||
|
comment: "Root",
|
||||||
|
default: null,
|
||||||
|
})
|
||||||
|
parentNode?: string | null;
|
||||||
|
|
||||||
@ManyToOne(() => AuthSys, (authSys) => authSys.authSys)
|
@ManyToOne(() => AuthSys, (authSys) => authSys.authSys)
|
||||||
@JoinColumn({ name: "authSysId" })
|
@JoinColumn({ name: "authSysId" })
|
||||||
authRoleAttrForSys: AuthSys;
|
authRoleAttrForSys: AuthSys;
|
||||||
|
|
@ -103,6 +111,9 @@ export class CreateAuthRoleAttr {
|
||||||
|
|
||||||
@Column("uuid")
|
@Column("uuid")
|
||||||
authSysId: string;
|
authSysId: string;
|
||||||
|
|
||||||
|
@Column()
|
||||||
|
parentNode?: string | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type UpdateAuthRoleAttr = Partial<CreateAuthRoleAttr>;
|
export type UpdateAuthRoleAttr = Partial<CreateAuthRoleAttr>;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue