Leosac
0.8.0
Open Source Access Control
|
CRUD Handler for Groups. More...
#include <GroupCRUD.hpp>
Static Public Member Functions | |
static CRUDResourceHandlerUPtr | instanciate (RequestContext) |
Static Public Member Functions inherited from Leosac::Module::WebSockAPI::CRUDResourceHandler | |
static CRUDResourceHandlerUPtr | instanciate (RequestContext) |
Private Member Functions | |
GroupCRUD (RequestContext ctx) | |
virtual std::vector< ActionActionParam > | required_permission (Verb verb, const json &req) const override |
virtual boost::optional< json > | create_impl (const json &req) override |
Create a new group. More... | |
virtual boost::optional< json > | read_impl (const json &req) override |
Retrieve information about a group. More... | |
virtual boost::optional< json > | update_impl (const json &req) override |
Update information about a group. More... | |
virtual boost::optional< json > | delete_impl (const json &req) override |
Delete a group. More... | |
void | validate_and_unique (Auth::GroupPtr grp) |
Make sure the group's attribute is valid (by calling GroupValidator) and that the name is unique. More... | |
CRUD Handler for Groups.
Definition at line 36 of file GroupCRUD.hpp.
|
private |
Definition at line 37 of file GroupCRUD.cpp.
Create a new group.
Request:
attributes
: A dictionnary of a groups' attributes.Accepted attributes:
Response:
Implements Leosac::Module::WebSockAPI::ICRUDResourceHandler.
Definition at line 48 of file GroupCRUD.cpp.
Delete a group.
Request:
group_id
: The group_id of the group we want to delete.Response:
Implements Leosac::Module::WebSockAPI::ICRUDResourceHandler.
Definition at line 145 of file GroupCRUD.cpp.
|
static |
Definition at line 42 of file GroupCRUD.cpp.
Retrieve information about a group.
Request:
group_id
: Group we want information about. Required. A group_id
of 0 means returns all known groups.For a non-administrator user, it will returns the group the user is a member of.
Response:
Implements Leosac::Module::WebSockAPI::ICRUDResourceHandler.
Definition at line 85 of file GroupCRUD.cpp.
|
overrideprivatevirtual |
Implements Leosac::Module::WebSockAPI::ICRUDResourceHandler.
Definition at line 182 of file GroupCRUD.cpp.
Update information about a group.
Request:
group_id
: The group_id of the group we want to update.attributes
: A dictionnary of a groups' attributes.Accepted attributes:
Response:
Implements Leosac::Module::WebSockAPI::ICRUDResourceHandler.
Definition at line 120 of file GroupCRUD.cpp.
|
private |
Make sure the group's attribute is valid (by calling GroupValidator) and that the name is unique.
Definition at line 164 of file GroupCRUD.cpp.