Policy fix
This commit is contained in:
@@ -50,13 +50,12 @@ export class UsersPolicy extends PolicyFactory(User) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
permittedAttributes(): Path[] {
|
permittedAttributes(): Path[] {
|
||||||
const attributes: (keyof Attributes<User>)[] = [
|
const attributes: (keyof Attributes<User>)[] = ["email", "firstName", "lastName", "displayName"]
|
||||||
"email",
|
|
||||||
"auth0Subject",
|
if (this.user.isSystemAdmin) {
|
||||||
"firstName",
|
attributes.push("roles")
|
||||||
"lastName",
|
attributes.push("auth0Subject")
|
||||||
"displayName",
|
}
|
||||||
]
|
|
||||||
|
|
||||||
return attributes
|
return attributes
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user