MarkLogic Connect
MarkLogic Connect Client API Collection
|
Represents a single MarkLogic Permission. More...
#include <Permission.hpp>
Public Member Functions | |
MLCLIENT_API | Permission (const std::string &role, const Capability &capability) |
Creates a permission with the specified role and capability. More... | |
MLCLIENT_API | Permission (Permission &&other) |
Move Constructor. | |
MLCLIENT_API | Permission (const Permission &other)=default |
Defalt copy constructor. | |
virtual MLCLIENT_API | ~Permission ()=default |
MLCLIENT_API Permission & | operator= (const Permission &other)=default |
Default copy assignment operator. | |
MLCLIENT_API const std::string & | getRole () const |
Returns the role string. More... | |
MLCLIENT_API void | setRole (const std::string &role) |
Sets the role string. More... | |
MLCLIENT_API const Capability & | getCapability () const |
Returns the capability. More... | |
MLCLIENT_API void | setCapability (const Capability &capability) |
Sets the capability. More... | |
Represents a single MarkLogic Permission.
A MarkLogic Permission consists of a Role name string (NOT a user), and a capability (Read, Update, Insert, Execute)
MLCLIENT_API mlclient::Permission::Permission | ( | const std::string & | role, |
const Capability & | capability | ||
) |
Creates a permission with the specified role and capability.
role | The MarkLogic role name (NOT numeric ID) |
capability | The capability |
|
virtualdefault |
Default Destructor
MLCLIENT_API const Capability& mlclient::Permission::getCapability | ( | ) | const |
Returns the capability.
MLCLIENT_API const std::string& mlclient::Permission::getRole | ( | ) | const |
Returns the role string.
MLCLIENT_API void mlclient::Permission::setCapability | ( | const Capability & | capability | ) |
Sets the capability.
capability | The role capability |
MLCLIENT_API void mlclient::Permission::setRole | ( | const std::string & | role | ) |
Sets the role string.
role | The role ID string (NOT the numeric ID) |