openDAQ
Open data acquisition platform
PermissionManagerPtr Class Reference

A class which is responsible for managing permissions on an object level. Given a user's group, it is possible to restrict or allow read, write and execute permissions for each object. It is also possible to specify if permissions are inherited from parent object. More...

Inherits ObjectPtr< IPermissionManager >.

Detailed Description

A class which is responsible for managing permissions on an object level. Given a user's group, it is possible to restrict or allow read, write and execute permissions for each object. It is also possible to specify if permissions are inherited from parent object.

Public Member Functions

void setPermissions (const daq::PermissionsPtr &permissions) const
 Set object permission configuration. More...
 
daq::Bool isAuthorized (const daq::UserPtr &user, daq::Permission permission) const
 Check if user has a given permission on an object of the permission manager. More...
 

Member Function Documentation

◆ isAuthorized()

daq::Bool isAuthorized ( const daq::UserPtr &  user,
daq::Permission  permission 
) const
inline

Check if user has a given permission on an object of the permission manager.

Parameters
userA reference to the user.
permissionA permission to test.
Returns
Returns true if user is authorized and false otherwise.

◆ setPermissions()

void setPermissions ( const daq::PermissionsPtr &  permissions) const
inline

Set object permission configuration.

Parameters
permissionsPermissions configuration object.