Allow tag update for basic user. Add canDelete on root of /Tags.
MODIFY
src/authorization/AuthorizationsDefinition.ts
src/authorization/AuthorizationsDefinition.ts
@@ -340,7 +340,7 @@ const AUTHORIZATION_DEFINITION: AuthorizationDefinition = {
}
},
{
- resource: Entity.TAG, action: Action.DELETE, attributes: ['*'],
+ resource: Entity.TAG, action: [Action.DELETE, Action.UPDATE], attributes: ['*'],
condition: {
Fn: 'custom:dynamicAuthorizationFilters',
args: { filters: ['OwnUser', 'SiteAdminUsers'] }

MODIFY
src/server/rest/v1/service/AuthorizationService.ts
src/server/rest/v1/service/AuthorizationService.ts
@@ -434,6 +434,7 @@ export default class AuthorizationService {
authorizationFilter: AuthorizationFilter): Promise<void> {
// Add canCreate flag to root
tags.canCreate = await AuthorizationService.canPerformAuthorizationAction(tenant, userToken, Entity.TAG, Action.CREATE, authorizationFilter);
+ tags.canDelete = await AuthorizationService.canPerformAuthorizationAction(tenant, userToken, Entity.TAG, Action.DELETE, authorizationFilter);
tags.canImport = await AuthorizationService.canPerformAuthorizationAction(tenant, userToken, Entity.TAGS, Action.IMPORT, authorizationFilter);
tags.canExport = await AuthorizationService.canPerformAuthorizationAction(tenant, userToken, Entity.TAGS, Action.EXPORT, authorizationFilter);
// Enrich

MODIFY
src/types/DataResult.ts
src/types/DataResult.ts
@@ -24,6 +24,7 @@ export interface SiteAreaDataResult extends DataResult<SiteArea>{
export interface TagDataResult extends DataResult<Tag>{
canCreate: boolean;
+ canDelete: boolean;
canImport: boolean;
canExport: boolean;
}

Allow tag update for basic user. Add canDelete on root of /Tags.