C++ Based OPC UA Client/Server/PubSub SDK  1.7.6.537
NodeAccessInfoBase Class Reference

Class for the user access flags of a node in the address space. More...

#include <nodeaccessinfobase.h>

Inherits NodeAccessInfo.

Public Member Functions

 NodeAccessInfoBase (UaMutexRefCounted *pSharedMutex=NULL)
 Creates a NodeAccessInfoBase object.
 
virtual UaStatus hasAccess (const SessionUserContext *pUserContext, Permissions requestedPermissions, AccessRestrictions availableFlags) const
 Check if access to a requested operation is granted for a specific SessionUserContext. More...
 
virtual bool hasAccess (const SessionUserContext *pUserContext, Permissions requestedPermissions) const
 Check if access to a requested operation is granted for a specific SessionUserContext. More...
 
virtual AccessRestrictions accessRestrictions () const
 Return the RestrictionFlags for the NodeAccessInfo. More...
 
virtual UaRolePermissionTypes getRolePermissions () const
 Return all RolePermissions configured for the NodeAccessInfo. More...
 
virtual UaRolePermissionTypes getUserRolePermissions (const SessionUserContext *pUserContext) const
 Return all RolePermissions configured for the NodeAccessInfo for a specific user. More...
 
- Public Member Functions inherited from ReferenceCounter
 ReferenceCounter ()
 construction
 
virtual ~ReferenceCounter ()
 destruction
 

Friends

UaDataStream & operator<< (UaDataStream &, const NodeAccessInfoBase &)
 Writes a NodeAccessInfoBase to the stream. More...
 
UaDataStream & operator>> (UaDataStream &, NodeAccessInfoBase &)
 Reads a NodeAccessInfoBase from the stream. More...
 

Additional Inherited Members

- Public Types inherited from NodeAccessInfo
enum  PermissionFlags {
  PERMISSION_NONE = 0x00000000, PERMISSION_BROWSE = 0x00000001, PERMISSION_READROLEPERMISSIONS = 0x00000002, PERMISSION_WRITEATTRIBUTE = 0x00000004,
  PERMISSION_WRITEROLEPERMISSIONS = 0x00000008, PERMISSION_WRITEHISTORIZING = 0x00000010, PERMISSION_READ = 0x00000020, PERMISSION_WRITE = 0x00000040,
  PERMISSION_READHISTORY = 0x00000080, PERMISSION_INSERTHISTORY = 0x00000100, PERMISSION_MODIFYHISTORY = 0x00000200, PERMISSION_DELETEHISTORY = 0x00000400,
  PERMISSION_RECEIVEEVENTS = 0x00000800, PERMISSION_CALL = 0x00001000, PERMISSION_ADDREFERENCE = 0x00002000, PERMISSION_REMOVEREFERENCE = 0x00004000,
  PERMISSION_DELETENODE = 0x00008000, PERMISSION_ADDNODE = 0x00010000, PERMISSION_OBSERVATION = PERMISSION_BROWSE | PERMISSION_READ | PERMISSION_READHISTORY | PERMISSION_RECEIVEEVENTS, PERMISSION_OPERATION = PERMISSION_OBSERVATION | PERMISSION_WRITE | PERMISSION_CALL,
  PERMISSION_OBSERVATION_VARIABLE = PERMISSION_BROWSE | PERMISSION_READ | PERMISSION_READHISTORY, PERMISSION_OPERATION_VARIABLE = PERMISSION_OBSERVATION_VARIABLE | PERMISSION_WRITE, PERMISSION_OBSERVATION_METHOD = PERMISSION_BROWSE, PERMISSION_OPERATION_METHOD = PERMISSION_OBSERVATION_METHOD | PERMISSION_CALL,
  PERMISSION_OBSERVATION_OBJECT = PERMISSION_BROWSE | PERMISSION_READHISTORY | PERMISSION_RECEIVEEVENTS, PERMISSION_OPERATION_OBJECT = PERMISSION_OBSERVATION_OBJECT | PERMISSION_CALL, PERMISSION_ALL = 0x0001FFFF
}
 Definition of the PermissionType Enumeration defining the permissions of the NodeAccessInfo. More...
 
enum  RestrictionFlags {
  RESTRICTION_NONE = 0x00, RESTRICTION_SIGNING_REQUIRED = 0x01, RESTRICTION_SIGN_AND_ENCRYPT_REQUIRED = 0x03, RESTRICTION_SESSION_REQUIRED = 0x04,
  RESTRICTION_APPLY_TO_BROWSE = 0x08, RESTRICTION_ALL = 0x0F, RESTRICTION_REQUIRED_MASK = RESTRICTION_SIGN_AND_ENCRYPT_REQUIRED | RESTRICTION_SESSION_REQUIRED
}
 Definition of the RestrictionFlags Enumeration defining possible restrictions to access a resource. More...
 
- Static Public Member Functions inherited from NodeAccessInfo
static UaStatus checkAccess (const Session *pSession, const NodeAccessInfo *pNodePermissions, const NodeAccessInfo *pDefaultPermissions, Permissions requestedPermissions)
 Helper method to easily check access based on a session context. More...
 
static AccessRestrictions accessRestrictionsFromSession (const Session *pSession)
 Helper method to extract the available RestrictionFlags from the SessionContext. More...
 

Detailed Description

Class for the user access flags of a node in the address space.

Toolkit implementation to support any number of roles.

Member Function Documentation

NodeAccessInfo::AccessRestrictions NodeAccessInfoBase::accessRestrictions ( ) const
virtual

Return the RestrictionFlags for the NodeAccessInfo.

Returns
The bitwise OR combination of the RestrictionFlags

Implements NodeAccessInfo.

UaRolePermissionTypes NodeAccessInfoBase::getRolePermissions ( ) const
virtual

Return all RolePermissions configured for the NodeAccessInfo.

A RolePermission is combination of RoleId and a number of PermissionFlags.

Returns
A list of all RolePermissions configured for the NodeAccessInfo

Implements NodeAccessInfo.

UaRolePermissionTypes NodeAccessInfoBase::getUserRolePermissions ( const SessionUserContext pUserContext) const
virtual

Return all RolePermissions configured for the NodeAccessInfo for a specific user.

A RolePermission consists of RoleId and a number of PermissionFlags.

Parameters
pUserContextThe SessionUserContext gives access to a list of RoleIds associated with a user.
Returns
A list of all RolePermissions configured for the NodeAccessInfo

Implements NodeAccessInfo.

UaStatus NodeAccessInfoBase::hasAccess ( const SessionUserContext pUserContext,
Permissions  requestedPermissions,
AccessRestrictions  availableFlags 
) const
virtual

Check if access to a requested operation is granted for a specific SessionUserContext.

The requested permission can be a single flag or a combination of PermissionFlags.

Parameters
pUserContextThe SessionUserContext gives access to a list of RoleIds associated with a user.
requestedPermissionsThe requested permission can be a single flag or a combination of PermissionFlags.
availableFlagsThe RestrictionFlags that are available form the session.
Returns
True if access is granted. Otherwise false.

Implements NodeAccessInfo.

bool NodeAccessInfoBase::hasAccess ( const SessionUserContext pUserContext,
Permissions  requestedPermissions 
) const
virtual

Check if access to a requested operation is granted for a specific SessionUserContext.

The requested permission can be a single flag or a combination of PermissionFlags.

Parameters
pUserContextThe SessionUserContext gives access to a list of RoleIds associated with a user.
requestedPermissionsThe requested permission can be a single flag or a combination of PermissionFlags.
Returns
True if access is granted. Otherwise false.

Implements NodeAccessInfo.

Friends And Related Function Documentation

UaDataStream& operator<< ( UaDataStream &  ,
const NodeAccessInfoBase  
)
friend

Writes a NodeAccessInfoBase to the stream.

UaDataStream& operator>> ( UaDataStream &  ,
NodeAccessInfoBase  
)
friend

Reads a NodeAccessInfoBase from the stream.


The documentation for this class was generated from the following files: