OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
MongoGroupFunctions Namespace Reference

Functions

void createGroup (std::string groupName, User &creatingUser, mongocxx::client &adminClient)
 
std::vector< GroupgetAllUserGroups (User &loggedInUser, mongocxx::client &userClient)
 
std::vector< GroupgetAllGroups (User &loggedInUser, mongocxx::client &userClient)
 
size_t getAllGroupCount (User &loggedInUser, mongocxx::client &userClient)
 
Group getGroupDataByName (std::string groupName, mongocxx::client &userClient)
 
Group getGroupDataById (std::string groupId, mongocxx::client &userClient)
 
bool changeGroupName (std::string oldName, std::string newName, mongocxx::client &adminClient)
 
bool changeGroupOwner (Group &group, User &oldUser, User &newUser, mongocxx::client &adminClient)
 
bool addUserToGroup (User &loggedInUser, std::string groupName, mongocxx::client &adminClient)
 
bool removeUserFromGroup (User &loggedInUser, std::string groupName, mongocxx::client &adminClient)
 
bool removeGroup (Group &groupToBeRemoved, mongocxx::client &adminClient)
 
std::string groupToJson (Group &grp)
 
std::string groupsToJson (std::vector< Group > &groups)
 
std::string generateUniqueGroupName (mongocxx::client &adminClient)
 

Function Documentation

◆ addUserToGroup()

bool MongoGroupFunctions::addUserToGroup ( User & loggedInUser,
std::string groupName,
mongocxx::client & adminClient )

◆ changeGroupName()

bool MongoGroupFunctions::changeGroupName ( std::string oldName,
std::string newName,
mongocxx::client & adminClient )

◆ changeGroupOwner()

bool MongoGroupFunctions::changeGroupOwner ( Group & group,
User & oldUser,
User & newUser,
mongocxx::client & adminClient )

◆ createGroup()

void MongoGroupFunctions::createGroup ( std::string groupName,
User & creatingUser,
mongocxx::client & adminClient )

◆ generateUniqueGroupName()

std::string MongoGroupFunctions::generateUniqueGroupName ( mongocxx::client & adminClient)

◆ getAllGroupCount()

size_t MongoGroupFunctions::getAllGroupCount ( User & loggedInUser,
mongocxx::client & userClient )

◆ getAllGroups()

std::vector< Group > MongoGroupFunctions::getAllGroups ( User & loggedInUser,
mongocxx::client & userClient )

◆ getAllUserGroups()

std::vector< Group > MongoGroupFunctions::getAllUserGroups ( User & loggedInUser,
mongocxx::client & userClient )

◆ getGroupDataById()

Group MongoGroupFunctions::getGroupDataById ( std::string groupId,
mongocxx::client & userClient )

◆ getGroupDataByName()

Group MongoGroupFunctions::getGroupDataByName ( std::string groupName,
mongocxx::client & userClient )

◆ groupsToJson()

std::string MongoGroupFunctions::groupsToJson ( std::vector< Group > & groups)

◆ groupToJson()

std::string MongoGroupFunctions::groupToJson ( Group & grp)

◆ removeGroup()

bool MongoGroupFunctions::removeGroup ( Group & groupToBeRemoved,
mongocxx::client & adminClient )

◆ removeUserFromGroup()

bool MongoGroupFunctions::removeUserFromGroup ( User & loggedInUser,
std::string groupName,
mongocxx::client & adminClient )