mirror of
https://github.com/OPCFoundation/UA-.NETStandard.git
synced 2026-10-26 04:19:53 +08:00
Merge pull request #2809 from romanett/MIFixRolePermissions
ValidateRolePermissions for MIs montioring the Value of a Node
This commit is contained in:
@@ -294,6 +294,15 @@ namespace Opc.Ua.Server
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user