3
0

Fix Role filter, add mising name attribute

This commit is contained in:
Denis Arh
2022-05-23 19:05:59 +02:00
parent 6355fc42d1
commit b6adec8a9c
2 changed files with 6 additions and 2 deletions
+4
View File
@@ -1078,6 +1078,10 @@ func RoleFilter(f systemType.RoleFilter) (ee []goqu.Expression, _ systemType.Rol
ee = append(ee, goqu.C("id").In(f.RoleID))
}
if val := strings.TrimSpace(f.Name); len(val) > 0 {
ee = append(ee, goqu.C("name").Eq(f.Name))
}
if val := strings.TrimSpace(f.Handle); len(val) > 0 {
ee = append(ee, goqu.C("handle").Eq(f.Handle))
}
+2 -2
View File
@@ -20,7 +20,7 @@ role: schema.#Resource & {
filter: {
struct: {
role_id: {goType: "[]uint64", ident: "roleID", storeIdent: "id" }
member_id: {goType: "uint64"}
member_id: {goType: "uint64" }
handle: {goType: "string"}
name: {goType: "string"}
@@ -29,7 +29,7 @@ role: schema.#Resource & {
}
query: ["handle", "name"]
byValue: ["role_id", "handle"]
byValue: ["role_id", "name", "handle"]
byNilState: ["deleted", "archived"]
}