openDAQ
Open data acquisition platform
PermissionsBuilderPtr Class Reference

A class which is responsible for assigning permissions to a property object. Permisison builder can specify allowed and denied permissions for each group. It can also inherit or overwrite premissions from parent objects. More...

Inherits ObjectPtr< IPermissionsBuilder >.

Detailed Description

A class which is responsible for assigning permissions to a property object. Permisison builder can specify allowed and denied permissions for each group. It can also inherit or overwrite premissions from parent objects.

Public Member Functions

PermissionsBuilderPtr inherit (daq::Bool inherit) const
 Configure component to inherit or ignore permissions from the parent object. More...
 
PermissionsBuilderPtr assign (const daq::StringPtr &groupId, const daq::PermissionMaskBuilderPtr &permissions) const
 Strictly assign a specified set of permissions for a given group. This method allows only the specified permissions and will not inherit any permissions from the parent object for the group, even if the inherit flag is enabled. More...
 
PermissionsBuilderPtr allow (const daq::StringPtr &groupId, const daq::PermissionMaskBuilderPtr &permissions) const
 Allow a specified set of permissions for a given group. If the inherit flag is enabled, this method will allow both the specified permissions and any permissions already allowed for the group on the parent component. Denied permissions will always overrule allowed permissions. More...
 
PermissionsBuilderPtr deny (const daq::StringPtr &groupId, const daq::PermissionMaskBuilderPtr &permissions) const
 Deny a specified set of permissions for a given group. If the inherit flag is enabled, this method will deny both the specified permissions and any permissions already denied for the group on the parent component. Denied permissions will always overrule allowed permissions. More...
 
PermissionsBuilderPtr extend (const daq::PermissionsPtr &config) const
 Add permissions of another permission config object and overwrite existing ones. Inherit flag will not be overwritten. More...
 
daq::PermissionsPtr build () const
 Builds the permission config object. More...
 

Member Function Documentation

◆ allow()

PermissionsBuilderPtr allow ( const daq::StringPtr &  groupId,
const daq::PermissionMaskBuilderPtr &  permissions 
) const
inline

Allow a specified set of permissions for a given group. If the inherit flag is enabled, this method will allow both the specified permissions and any permissions already allowed for the group on the parent component. Denied permissions will always overrule allowed permissions.

Parameters
groupIdThe id of a group to allow permissions for.
permissionsA set of permissions to allow for given group.

◆ assign()

PermissionsBuilderPtr assign ( const daq::StringPtr &  groupId,
const daq::PermissionMaskBuilderPtr &  permissions 
) const
inline

Strictly assign a specified set of permissions for a given group. This method allows only the specified permissions and will not inherit any permissions from the parent object for the group, even if the inherit flag is enabled.

Parameters
groupIdThe id of a group to set permissions for.
permissionsA set of permissions to allow for given group.

◆ build()

daq::PermissionsPtr build ( ) const
inline

Builds the permission config object.

Parameters
configOut[out]Permission config object.

◆ deny()

PermissionsBuilderPtr deny ( const daq::StringPtr &  groupId,
const daq::PermissionMaskBuilderPtr &  permissions 
) const
inline

Deny a specified set of permissions for a given group. If the inherit flag is enabled, this method will deny both the specified permissions and any permissions already denied for the group on the parent component. Denied permissions will always overrule allowed permissions.

Parameters
groupIdThe id of a group to deny permissions for.
permissionsA set of permissions to deny for given group.

◆ extend()

PermissionsBuilderPtr extend ( const daq::PermissionsPtr &  config) const
inline

Add permissions of another permission config object and overwrite existing ones. Inherit flag will not be overwritten.

Parameters
configPermission config object.

◆ inherit()

PermissionsBuilderPtr inherit ( daq::Bool  inherit) const
inline

Configure component to inherit or ignore permissions from the parent object.

Parameters
inheritFlag signifying if component should inherit permissions from its parent object.