//Utility Companies to have access to their own account
rule UtilityCompanyAccessOwnRecord {
description: "Allow utilty company to access only their profile"
participant(p): "org.decentralized.energy.network.UtilityCompany"
operation: READ, UPDATE, DELETE
resource(r): "org.decentralized.energy.network.UtilityCompany"
condition: (r.getIdentifier() === p.getIdentifier())
action: ALLOW
}
//Utility Companies to have read only access to other Utility Companies
rule UtilityCompanyReadAccessUtilityCompanies {
description: "Allow utility companies read access to other Utility Companies"
participant: "org.decentralized.energy.network.UtilityCompany"
operation: READ
resource: "org.decentralized.energy.network.UtilityCompany"
action: ALLOW
}