Grassroots Infrastructure
The Grassroots Infrastructure is a suite of computing tools to help users and developers use scientific data infrastructure that can easily be interconnected.
|
Go to the documentation of this file.
8 #ifndef CORE_SHARED_UTIL_INCLUDE_USER_GROUP_H_
9 #define CORE_SHARED_UTIL_INCLUDE_USER_GROUP_H_
37 #ifndef DOXYGEN_SHOULD_SKIP_THIS
40 #ifdef ALLOCATE_USER_GROUP_TAGS
41 #define USER_GROUP_PREFIX GRASSROOTS_USERS_API
42 #define USER_GROUP_VAL(x) = x
43 #define USER_GROUP_CONCAT_VAL(x,y) = x y
45 #define USER_GROUP_PREFIX extern GRASSROOTS_USERS_API
46 #define USER_GROUP_VAL(x)
47 #define USER_GROUP_CONCAT_VAL(x,y)
55 USER_GROUP_PREFIX
const char *
const UG_USERS_S
USER_GROUP_VAL (
"users");
GRASSROOTS_USERS_API bool IsUserInGroup(const UserGroup *const group_p, const User *const user_p)
Check whether a given User is a member of a UserGroup.
GRASSROOTS_USERS_API bool AddUserToGroup(UserGroup *group_p, User *user_p)
Add a given User to a UserGroup.
GRASSROOTS_USERS_API void FreeUserGroup(UserGroup *group_p)
Free a UserGroup.
A datatype to store user credentials.
Definition: user_group.h:23
GRASSROOTS_USERS_API json_t * GetUserGroupAsJSON(UserGroup *group_p, const bool full_user_flag)
Get the json for a UserGroup.
GRASSROOTS_USERS_API UserGroup * AllocateUserGroup(const char *name_s)
Allocate a UserGroup with the given name.
Definition: user_group.h:30
UserGroup * ugn_group_p
Definition: user_group.h:33
#define CONTEXT_PREFIX_SCHEMA_ORG_S
Definition: schema_keys.h:103
GRASSROOTS_USERS_API UserGroup * GetUserGroupFromJSON(const json_t *group_json_p)
Get a UserGroup from a json representation.
A doubly-linked list that can be traversed in either direction.
Definition: linked_list.h:56
GRASSROOTS_USERS_API void FreeUserGroupNode(ListItem *node_p)
Free a UserGroupNode.
char * ug_name_s
Definition: user_group.h:25
#define GRASSROOTS_USERS_API
Definition: grassroots_users_library.h:46
A datatype to store user credentials.
Definition: user_details.h:40
const USER_GROUP_PREFIX char *const UG_USERS_S USER_GROUP_VAL("users")
GRASSROOTS_USERS_API UserGroupNode * AllocateUserGroupNode(UserGroup *group_p)
Allocate a UserGroupNode for the given UserGroup.
ListItem ugn_node
Definition: user_group.h:32
LinkedList * ug_users_p
Definition: user_group.h:26
A doubly-linked node that points to its predecessor and successor.
Definition: linked_list.h:43
const USER_GROUP_PREFIX char *const UG_NAME_S USER_GROUP_CONCAT_VAL(CONTEXT_PREFIX_SCHEMA_ORG_S, "name")