Skip to content

Commit

Permalink
Merge pull request #2809 from romanett/MIFixRolePermissions
Browse files Browse the repository at this point in the history
ValidateRolePermissions for MIs montioring the Value of a Node
  • Loading branch information
salihgoncu authored Nov 24, 2024
2 parents 3543d02 + dfa4c9a commit ed78fce
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Libraries/Opc.Ua.Server/Diagnostics/MonitoredNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,15 @@ public void OnMonitoredNodeChanged(ISystemContext context, NodeState node, NodeS

if (monitoredItem.AttributeId == Attributes.Value && (changes & NodeStateChangeMasks.Value) != 0)
{
// validate if the monitored item has the required role permissions to read the value
ServiceResult validationResult = NodeManager.ValidateRolePermissions(new OperationContext(monitoredItem), node.NodeId, PermissionType.Read);

if (ServiceResult.IsBad(validationResult))
{
// skip if the monitored item does not have permission to read
continue;
}

QueueValue(context, node, monitoredItem);
continue;
}
Expand Down

0 comments on commit ed78fce

Please sign in to comment.