Remove debug tab for super admin
MODIFY
src/authorization/AuthorizationsDefinition.ts
src/authorization/AuthorizationsDefinition.ts
@@ -82,7 +82,7 @@ export const AUTHORIZATION_DEFINITION: AuthorizationDefinition = {
'fastChargePowerMax', 'drivetrainPowerHP'
]
},
- { resource: Entity.CAR_CATALOG, action: [Action.SYNCHRONIZE, Action.DEBUG] },
+ { resource: Entity.CAR_CATALOG, action: Action.SYNCHRONIZE },
{
resource: Entity.CAR_CATALOG, action: Action.READ,
attributes: [

MODIFY
src/server/rest/v1/service/AuthorizationService.ts
src/server/rest/v1/service/AuthorizationService.ts
@@ -649,8 +649,6 @@ export default class AuthorizationService {
tenant, userToken, Entity.CAR_CATALOG, Action.DELETE, authorizationFilter, { CarCatalogID: carCatalog.id }, carCatalog);
carCatalog.canUpdate = await AuthorizationService.canPerformAuthorizationAction(
tenant, userToken, Entity.CAR_CATALOG, Action.UPDATE, authorizationFilter, { CarCatalogID: carCatalog.id }, carCatalog);
- carCatalog.canDebug = carCatalog.canUpdate = await AuthorizationService.canPerformAuthorizationAction(
- tenant, userToken, Entity.CAR_CATALOG, Action.DEBUG, authorizationFilter);
// Optimize data over the net
Utils.removeCanPropertiesWithFalseValue(carCatalog);
}

MODIFY
src/types/Authorization.ts
src/types/Authorization.ts
@@ -192,10 +192,6 @@ export interface CarAuthorizationActions extends AuthorizationActions {
canCreatePoolCar?: boolean;
}
-export interface CarCatalogAuthorizationActions extends AuthorizationActions {
- canDebug?: boolean;
-}
-
export interface TagAuthorizationActions extends AuthorizationActions {
canUnassign?: boolean;
canAssign?: boolean;

MODIFY
src/types/Car.ts
src/types/Car.ts
-import { CarAuthorizationActions, CarCatalogAuthorizationActions } from './Authorization';
+import { AuthorizationActions, CarAuthorizationActions } from './Authorization';
import CreatedUpdatedProps from './CreatedUpdatedProps';
-export interface CarCatalog extends CreatedUpdatedProps, CarCatalogAuthorizationActions {
+export interface CarCatalog extends CreatedUpdatedProps, AuthorizationActions {
id: number;
vehicleMake: string;
vehicleModel: string;

Remove debug tab for super admin