fixed site admin auth
MODIFY
src/authorization/AuthorizationsDefinition.ts
src/authorization/AuthorizationsDefinition.ts
@@ -1016,7 +1016,15 @@ export const AUTHORIZATION_DEFINITION: AuthorizationDefinition = {
},
{
resource: Entity.SITE_AREA,
- action: [Action.READ, Action.READ_ASSETS_FROM_SITE_AREA],
+ action: [Action.READ],
+ attributes: [
+ 'id', 'name', 'issuer', 'image', 'address', 'maximumPower', 'numberOfPhases',
+ 'voltage', 'smartCharging', 'accessControl', 'connectorStats', 'siteID', 'site.name', 'site.public', 'tariffID'
+ ]
+ },
+ {
+ resource: Entity.SITE_AREA,
+ action: [Action.READ_ASSETS_FROM_SITE_AREA],
condition: {
Fn: 'custom:dynamicAuthorizations',
args: {
@@ -1026,7 +1034,7 @@ export const AUTHORIZATION_DEFINITION: AuthorizationDefinition = {
},
attributes: [
'id', 'name', 'issuer', 'image', 'address', 'maximumPower', 'numberOfPhases',
- 'voltage', 'smartCharging', 'accessControl', 'connectorStats', 'siteID', 'site.name', 'site.public', 'tariffID'
+ 'voltage', 'smartCharging', 'accessControl', 'connectorStats', 'siteID', 'site.name'
],
},
{

fixed site admin auth