added filters to users authorizations
MODIFY
src/server/rest/v1/service/AuthorizationService.ts
src/server/rest/v1/service/AuthorizationService.ts
@@ -284,6 +284,10 @@ export default class AuthorizationService {
tenant, userToken, Entity.USER, Action.EXPORT, authorizationFilter);
users.canImport = await AuthorizationService.canPerformAuthorizationAction(
tenant, userToken, Entity.USER, Action.IMPORT, authorizationFilter);
+ users.canListTags = await AuthorizationService.canPerformAuthorizationAction(
+ tenant, userToken, Entity.TAG, Action.LIST, authorizationFilter);
+ users.canListSites = await AuthorizationService.canPerformAuthorizationAction(
+ tenant, userToken, Entity.SITE, Action.LIST, authorizationFilter);
for (const user of users.result) {
await AuthorizationService.addUserAuthorizations(tenant, userToken, user, authorizationFilter);
}

MODIFY
src/types/DataResult.ts
src/types/DataResult.ts
@@ -74,6 +74,8 @@ export interface UserDataResult extends DataResult<User> {
canCreate: boolean;
canExport: boolean;
canImport: boolean;
+ canListTags: boolean;
+ canListSites: boolean;
}
export interface TagDataResult extends DataResult<Tag> {
canCreate: boolean;

added filters to users authorizations