refactor: rename role.options -> role.policies
This commit is contained in:
parent
518b3e2f73
commit
81f11d8f86
53 changed files with 254 additions and 232 deletions
|
@ -62,8 +62,8 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
|
|||
private activeUsersChart: ActiveUsersChart,
|
||||
) {
|
||||
super(meta, paramDef, async (ps, me) => {
|
||||
const role = await this.roleService.getUserRoleOptions(me ? me.id : null);
|
||||
if (!role.gtlAvailable) {
|
||||
const policies = await this.roleService.getUserPolicies(me ? me.id : null);
|
||||
if (!policies.gtlAvailable) {
|
||||
throw new ApiError(meta.errors.gtlDisabled);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue