Basic and Demo should not see the TariffID
Site Admin must see the OCPI TariffID
Added TariffID in Projected fields in Site/Site Area lists for Admin, Site Admin
> Hide the tab OCPI in Site/Site Area
MODIFY
src/authorization/AuthorizationsDefinition.ts
src/authorization/AuthorizationsDefinition.ts
@@ -327,7 +327,7 @@ export const AUTHORIZATION_DEFINITION: AuthorizationDefinition = {
resource: Entity.SITE, action: Action.LIST,
attributes: [
'id', 'name', 'address.address1', 'address.address2', 'address.postalCode', 'address.city',
- 'address.department', 'address.region', 'address.country',
+ 'address.department', 'address.region', 'address.country', 'tariffID',
'address.coordinates', 'companyID', 'company.name', 'autoUserSiteAssignment', 'issuer',
'autoUserSiteAssignment', 'distanceMeters', 'public', 'createdOn', 'lastChangedOn',
'createdBy.name', 'createdBy.firstName', 'lastChangedBy.name', 'lastChangedBy.firstName', 'connectorStats'
@@ -405,7 +405,7 @@ export const AUTHORIZATION_DEFINITION: AuthorizationDefinition = {
attributes: [
'id', 'name', 'siteID', 'maximumPower', 'voltage', 'numberOfPhases', 'accessControl', 'smartCharging', 'chargingStations.id',
'address.address1', 'address.address2', 'address.postalCode', 'address.city',
- 'address.department', 'address.region', 'address.country',
+ 'address.department', 'address.region', 'address.country', 'tariffID',
'address.coordinates', 'site.id', 'site.name', 'site.public', 'parentSiteAreaID', 'parentSiteArea.name', 'issuer', 'distanceMeters',
'createdOn', 'createdBy.name', 'createdBy.firstName', 'lastChangedOn', 'lastChangedBy.name', 'lastChangedBy.firstName', 'connectorStats'
]
@@ -1343,8 +1343,7 @@ export const AUTHORIZATION_DEFINITION: AuthorizationDefinition = {
},
attributes: [
'id','issuer','public','siteAreaID','lastSeen','inactive','forceInactive','manualConfiguration','voltage','coordinates','chargingStationURL', 'forceInactive',
- 'tariffID', 'maximumPower', 'masterSlave',
- 'chargePoints.chargePointID','chargePoints.currentType','chargePoints.voltage','chargePoints.amperage','chargePoints.numberOfConnectedPhase',
+ 'maximumPower', 'masterSlave', 'chargePoints.chargePointID','chargePoints.currentType','chargePoints.voltage','chargePoints.amperage','chargePoints.numberOfConnectedPhase',
'chargePoints.cannotChargeInParallel','chargePoints.sharePowerToAllConnectors','chargePoints.excludeFromPowerLimitation','chargePoints.ocppParamForPowerLimitation',
'chargePoints.power','chargePoints.efficiency','chargePoints.connectorIDs',
'connectors.status', 'connectors.type', 'connectors.power', 'connectors.errorCode', 'connectors.connectorId', 'connectors.currentTotalConsumptionWh',
@@ -1883,8 +1882,7 @@ export const AUTHORIZATION_DEFINITION: AuthorizationDefinition = {
},
attributes: [
'id', 'issuer', 'public', 'siteAreaID', 'lastSeen', 'inactive', 'forceInactive', 'manualConfiguration', 'voltage', 'coordinates', 'chargingStationURL',
- 'forceInactive', 'tariffID', 'maximumPower', 'masterSlave',
- 'chargePoints.chargePointID','chargePoints.currentType','chargePoints.voltage','chargePoints.amperage','chargePoints.numberOfConnectedPhase',
+ 'forceInactive', 'maximumPower', 'masterSlave', 'chargePoints.chargePointID','chargePoints.currentType','chargePoints.voltage','chargePoints.amperage','chargePoints.numberOfConnectedPhase',
'chargePoints.cannotChargeInParallel','chargePoints.sharePowerToAllConnectors','chargePoints.excludeFromPowerLimitation','chargePoints.ocppParamForPowerLimitation',
'chargePoints.power','chargePoints.efficiency','chargePoints.connectorIDs',
'connectors.status', 'connectors.type', 'connectors.power', 'connectors.errorCode', 'connectors.connectorId', 'connectors.currentTotalConsumptionWh',
@@ -2242,6 +2240,22 @@ export const AUTHORIZATION_DEFINITION: AuthorizationDefinition = {
}
},
},
+ {
+ resource: Entity.SITE, action: Action.LIST,
+ condition: {
+ Fn: 'custom:dynamicAuthorizations',
+ args: {
+ asserts: [],
+ filters: ['AssignedSites']
+ }
+ },
+ attributes: [
+ 'id', 'name', 'address.address1', 'address.address2', 'address.postalCode', 'address.city',
+ 'address.department', 'address.region', 'address.country', 'tariffID',
+ 'address.coordinates', 'companyID', 'company.name', 'autoUserSiteAssignment', 'issuer',
+ 'autoUserSiteAssignment', 'distanceMeters', 'public', 'createdOn', 'lastChangedOn', 'connectorStats'
+ ],
+ },
{
resource: Entity.SITE, action: Action.READ,
condition: {
@@ -2279,6 +2293,23 @@ export const AUTHORIZATION_DEFINITION: AuthorizationDefinition = {
}
},
},
+ {
+ resource: Entity.SITE_AREA, action: Action.LIST,
+ condition: {
+ Fn: 'custom:dynamicAuthorizations',
+ args: {
+ asserts: [],
+ filters: ['AssignedSites']
+ }
+ },
+ attributes: [
+ 'id', 'name', 'siteID', 'maximumPower', 'voltage', 'numberOfPhases', 'accessControl', 'smartCharging', 'chargingStations.id',
+ 'address.address1', 'address.address2', 'address.postalCode', 'address.city',
+ 'address.department', 'address.region', 'address.country', 'tariffID',
+ 'address.coordinates', 'site.id', 'site.name', 'parentSiteAreaID', 'parentSiteArea.name', 'issuer',
+ 'distanceMeters', 'createdOn', 'lastChangedOn', 'connectorStats'
+ ],
+ },
{
resource: Entity.SITE_AREA, action: Action.READ,
attributes: [

Basic and Demo should not see the TariffID
Site Admin must see the OCPI TariffID
Added TariffID in Projected fields in Site/Site Area lists for Admin, Site Admin
-> Hide the tab OCPI in Site/Site Area