Leosac  0.8.0
Open Source Access Control
Leosac::Module::WebSockAPI::MembershipCRUD Class Reference

CRUD Handler for UserGroupMembership. More...

#include <MembershipCRUD.hpp>

+ Inheritance diagram for Leosac::Module::WebSockAPI::MembershipCRUD:
+ Collaboration diagram for Leosac::Module::WebSockAPI::MembershipCRUD:

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

 MembershipCRUD (RequestContext ctx)
 
virtual std::vector< ActionActionParamrequired_permission (Verb verb, const json &req) const override
 
virtual boost::optional< jsoncreate_impl (const json &req) override
 Creating a new UserGroupMembersip: this means someone is joining a group. More...
 
virtual boost::optional< jsonread_impl (const json &req) override
 Retrieve information about a group. More...
 
virtual boost::optional< jsonupdate_impl (const json &req) override
 
virtual boost::optional< jsondelete_impl (const json &req) override
 

Additional Inherited Members

- Public Types inherited from Leosac::Module::WebSockAPI::CRUDResourceHandler
using Factory = CRUDResourceHandlerUPtr(*)(RequestContext)
 
- Public Types inherited from Leosac::Module::WebSockAPI::ICRUDResourceHandler
enum  Verb { Verb::CREATE, Verb::READ, Verb::UPDATE, Verb::DELETE }
 
- Public Member Functions inherited from Leosac::Module::WebSockAPI::ICRUDResourceHandler
boost::optional< jsonprocess (const ClientMessage &msg)
 
- Protected Types inherited from Leosac::Module::WebSockAPI::ICRUDResourceHandler
using ActionActionParam = std::pair< SecurityContext::Action, SecurityContext::ActionParam >
 A pair of Action and a generic ActionParam union. More...
 
- Protected Member Functions inherited from Leosac::Module::WebSockAPI::CRUDResourceHandler
 CRUDResourceHandler (RequestContext ctx)
 
virtual UserSecurityContextsecurity_context () const override
 Helper function that returns the security context. More...
 
- Protected Attributes inherited from Leosac::Module::WebSockAPI::CRUDResourceHandler
RequestContext ctx_
 

Detailed Description

CRUD Handler for UserGroupMembership.

Definition at line 34 of file MembershipCRUD.hpp.

Constructor & Destructor Documentation

◆ MembershipCRUD()

MembershipCRUD::MembershipCRUD ( RequestContext  ctx)
private

Definition at line 40 of file MembershipCRUD.cpp.

Member Function Documentation

◆ create_impl()

boost::optional< json > MembershipCRUD::create_impl ( const json req)
overrideprivatevirtual

Creating a new UserGroupMembersip: this means someone is joining a group.

Request:

  • group_id: The group to join
  • user_id: The user that join.
  • rank: The rank of the user in the group

Response:

  • ...

Implements Leosac::Module::WebSockAPI::ICRUDResourceHandler.

Definition at line 51 of file MembershipCRUD.cpp.

◆ delete_impl()

boost::optional< json > MembershipCRUD::delete_impl ( const json req)
overrideprivatevirtual

◆ instanciate()

CRUDResourceHandlerUPtr MembershipCRUD::instanciate ( RequestContext  ctx)
static

Definition at line 45 of file MembershipCRUD.cpp.

◆ read_impl()

boost::optional< json > MembershipCRUD::read_impl ( const json req)
overrideprivatevirtual

Retrieve information about a group.

Request:

  • membership_id: The id of the membership to look up. Required

Response:

  • ...

Implements Leosac::Module::WebSockAPI::ICRUDResourceHandler.

Definition at line 85 of file MembershipCRUD.cpp.

◆ required_permission()

std::vector< CRUDResourceHandler::ActionActionParam > MembershipCRUD::required_permission ( CRUDResourceHandler::Verb  verb,
const json req 
) const
overrideprivatevirtual

◆ update_impl()

boost::optional< json > MembershipCRUD::update_impl ( const json req)
overrideprivatevirtual

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