pianod2
multisource multiuser scriptable networked music player
Namespaces | Macros | Typedefs | Enumerations | Functions | Variables
users.cpp File Reference

User management provider. More...

#include <config.h>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cassert>
#include <unistd.h>
#include <sys/types.h>
#include <string>
#include <map>
#include <vector>
#include <iostream>
#include <fstream>
#include <football/fb_public.h>
#include <parsnip/parsnip.h>
#include <parsnip/parsnip_command.h>
#include "interpreter.h"
#include "enum.h"
#include "fundamentals.h"
#include "utility.h"
#include "user.h"
#include "users.h"
#include "response.h"
#include "logging.h"
#include "fileio.h"
#include "connection.h"
Include dependency graph for users.cpp:

Namespaces

 userconfig
 Dictionary names for user data file.
 

Macros

#define countof(x)   (sizeof (x) / sizeof (*x))
 

Typedefs

typedef enum find_kind_t FIND_KIND
 

Enumerations

enum  find_kind_t { FIND_OPEN_CONNECTIONS , FIND_ALL_CONNECTIONS }
 

Functions

static bool datastoreIsListed (UserData::DataStore *data, User *owner, const User *requester)
 Determine if a datastore's contents are eligible for reading by a user. More...
 

Variables

const char * userconfig::user_list = "users"
 
const char * userconfig::shadow_user = "shadow"
 
static const char * UserDataJSONFilename = "passwd.json"
 
UserManageruser_manager
 

Detailed Description

User management provider.

Macro Definition Documentation

◆ countof

#define countof (   x)    (sizeof (x) / sizeof (*x))

Typedef Documentation

◆ FIND_KIND

typedef enum find_kind_t FIND_KIND

Enumeration Type Documentation

◆ find_kind_t

Enumerator
FIND_OPEN_CONNECTIONS 
FIND_ALL_CONNECTIONS 

Function Documentation

◆ datastoreIsListed()

static bool datastoreIsListed ( UserData::DataStore data,
User owner,
const User requester 
)
static

Determine if a datastore's contents are eligible for reading by a user.

Parameters
dataThe datastore.
ownerThe owner of the datastore.
requesterThe user that wants to access the data.
Returns
True if the requester is eligible to read the data.
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ user_manager

UserManager* user_manager

◆ UserDataJSONFilename

const char* UserDataJSONFilename = "passwd.json"
static