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_PERMISSION_H_
9 #define CORE_SHARED_UTIL_INCLUDE_PERMISSION_H_
31 typedef struct Permisssions
void ClearPermissions(Permissions *permissions_p)
PermissionsGroup * GetPermissionsGroupFromChildJSON(const json_t *parent_json_p, const char *const key_s, const GrassrootsServer *grassroots_p)
Definition: permission.h:25
json_t * GetPermissionsAsJSON(const Permissions *permissions_p, const ViewFormat vf)
void FreePermissionsGroup(PermissionsGroup *permissions_group_p)
PermissionsManager * AllocatePermissionsManager(GrassrootsServer *grassroots_p, const char *database_s, const char *collection_s)
A datatype to store user credentials.
Definition: user_group.h:23
Permissions * GetPermissionsFromJSON(const json_t *permissions_json_p, const GrassrootsServer *grassroots_p)
void FreePermissionsManager(PermissionsManager *manager_p)
bool AddPermissionsGroupToJSON(const PermissionsGroup *permissions_group_p, json_t *json_p, const char *const key_s, const ViewFormat vf)
MongoTool * pm_mongo_p
Definition: permission.h:58
bool AddGroupToPermissions(Permissions *permissions_p, UserGroup *group_p)
Permissions * pg_delete_access_p
Definition: permission.h:47
Definition: permission.h:26
Definition: permission.h:24
PermissionsGroup * pm_permissions_p
Definition: permission.h:60
LinkedList * pe_groups_p
Definition: permission.h:37
PermissionsGroup * AllocatePermissionsGroup(void)
bool HasPermissionsSet(const Permissions *const permissions_p)
json_t * GetPermissionsGroupAsJSON(const PermissionsGroup *permissions_group_p, const ViewFormat vf)
Permissions * pg_read_access_p
Definition: permission.h:43
Definition: permission.h:41
char * pm_collection_s
Definition: permission.h:56
void FreePermissions(Permissions *permissions_p)
AccessMode
Definition: permission.h:22
bool SetAccessModeFromString(AccessMode *ar_p, const char *const ar_s)
LinkedList * pe_users_p
Definition: permission.h:35
A doubly-linked list that can be traversed in either direction.
Definition: linked_list.h:56
Permissions * AllocatePermissions(AccessMode access)
Definition: permission.h:27
bool AddUserToPermissions(Permissions *permissions_p, User *user_p)
Definition: permission.h:31
Definition: grassroots_server.h:45
AccessMode pe_access
Definition: permission.h:33
const char * GetAccessRightsAsString(const AccessMode ar)
A datatype to store user credentials.
Definition: user_details.h:40
Permissions * pg_write_access_p
Definition: permission.h:45
bool CheckPermissionsManagerForUser(const PermissionsManager *const permissions_manager_p, const User *const user_p, const AccessMode mode)
char * pm_database_s
Definition: permission.h:54
bool CheckPermissionsGroupForUser(const PermissionsGroup *const permissions_manager_p, const User *const user_p, const AccessMode mode)
Definition: permission.h:52
#define GRASSROOTS_UTIL_API
Definition: grassroots_util_library.h:47
PermissionsGroup * GetPermissionsGroupFromJSON(const json_t *permissions_group_json_p, const GrassrootsServer *grassroots_p)
bool CheckPermissionsForUser(const Permissions *const permissions_p, const User *const user_p)