OmniSciDB  1dac507f6e
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
AccessPrivileges Struct Reference

#include <DBObject.h>

+ Collaboration diagram for AccessPrivileges:

Public Member Functions

 AccessPrivileges ()
 
 AccessPrivileges (int64_t priv)
 
void reset ()
 
bool hasAny () const
 
bool hasPermission (int permission) const
 
void add (AccessPrivileges newprivs)
 
void remove (AccessPrivileges newprivs)
 

Public Attributes

int64_t privileges
 

Static Public Attributes

static const AccessPrivileges NONE = AccessPrivileges(0)
 
static const AccessPrivileges ALL_DATABASE
 
static const AccessPrivileges VIEW_SQL_EDITOR
 
static const AccessPrivileges ACCESS
 
static const AccessPrivileges ALL_TABLE_MIGRATE
 
static const AccessPrivileges ALL_TABLE
 
static const AccessPrivileges CREATE_TABLE
 
static const AccessPrivileges DROP_TABLE
 
static const AccessPrivileges SELECT_FROM_TABLE
 
static const AccessPrivileges INSERT_INTO_TABLE
 
static const AccessPrivileges UPDATE_IN_TABLE
 
static const AccessPrivileges DELETE_FROM_TABLE
 
static const AccessPrivileges TRUNCATE_TABLE
 
static const AccessPrivileges ALTER_TABLE
 
static const AccessPrivileges ALL_DASHBOARD_MIGRATE
 
static const AccessPrivileges ALL_DASHBOARD
 
static const AccessPrivileges CREATE_DASHBOARD
 
static const AccessPrivileges VIEW_DASHBOARD
 
static const AccessPrivileges EDIT_DASHBOARD
 
static const AccessPrivileges DELETE_DASHBOARD
 
static const AccessPrivileges ALL_VIEW_MIGRATE
 
static const AccessPrivileges ALL_VIEW = AccessPrivileges(ViewPrivileges::ALL)
 
static const AccessPrivileges CREATE_VIEW
 
static const AccessPrivileges DROP_VIEW
 
static const AccessPrivileges SELECT_FROM_VIEW
 
static const AccessPrivileges INSERT_INTO_VIEW
 
static const AccessPrivileges UPDATE_IN_VIEW
 
static const AccessPrivileges DELETE_FROM_VIEW
 
static const AccessPrivileges TRUNCATE_VIEW
 

Detailed Description

Definition at line 125 of file DBObject.h.

Constructor & Destructor Documentation

AccessPrivileges::AccessPrivileges ( )
inline

Definition at line 128 of file DBObject.h.

128 : privileges(0) {}
int64_t privileges
Definition: DBObject.h:126
AccessPrivileges::AccessPrivileges ( int64_t  priv)
inline

Definition at line 130 of file DBObject.h.

130 : privileges(priv) {}
int64_t privileges
Definition: DBObject.h:126

Member Function Documentation

void AccessPrivileges::add ( AccessPrivileges  newprivs)
inline

Definition at line 138 of file DBObject.h.

References privileges.

Referenced by MapDHandler::share_dashboard(), and MapDHandler::unshare_dashboard().

138 { privileges |= newprivs.privileges; }
int64_t privileges
Definition: DBObject.h:126

+ Here is the caller graph for this function:

bool AccessPrivileges::hasAny ( ) const
inline

Definition at line 133 of file DBObject.h.

References privileges.

Referenced by checkPermissionForTables(), and hasAnyPrivs().

133 { return 0L != privileges; }
int64_t privileges
Definition: DBObject.h:126

+ Here is the caller graph for this function:

bool AccessPrivileges::hasPermission ( int  permission) const
inline

Definition at line 134 of file DBObject.h.

References privileges.

Referenced by Parser::ShowPrivilegesStmt::execute(), MapDHandler::has_dashboard_permission(), MapDHandler::has_database_permission(), MapDHandler::has_table_permission(), and MapDHandler::has_view_permission().

134  {
135  return permission == (privileges & permission);
136  }
int64_t privileges
Definition: DBObject.h:126

+ Here is the caller graph for this function:

void AccessPrivileges::remove ( AccessPrivileges  newprivs)
inline

Definition at line 139 of file DBObject.h.

References privileges.

139 { privileges &= ~(newprivs.privileges); }
int64_t privileges
Definition: DBObject.h:126
void AccessPrivileges::reset ( )
inline

Definition at line 132 of file DBObject.h.

References privileges.

Referenced by DBObject::resetPrivileges().

132 { privileges = 0L; }
int64_t privileges
Definition: DBObject.h:126

+ Here is the caller graph for this function:

Member Data Documentation

const AccessPrivileges AccessPrivileges::ALL_DASHBOARD_MIGRATE
static
const AccessPrivileges AccessPrivileges::ALL_TABLE_MIGRATE
static
const AccessPrivileges AccessPrivileges::ALL_VIEW_MIGRATE
static
const AccessPrivileges AccessPrivileges::ALTER_TABLE
static
const AccessPrivileges AccessPrivileges::CREATE_VIEW
static
const AccessPrivileges AccessPrivileges::DELETE_FROM_TABLE
static
const AccessPrivileges AccessPrivileges::DELETE_FROM_VIEW
static
Initial value:

Definition at line 176 of file DBObject.h.

const AccessPrivileges AccessPrivileges::DROP_TABLE
static
const AccessPrivileges AccessPrivileges::DROP_VIEW
static
const AccessPrivileges AccessPrivileges::INSERT_INTO_VIEW
static
Initial value:

Definition at line 174 of file DBObject.h.

const AccessPrivileges AccessPrivileges::NONE = AccessPrivileges(0)
static

Definition at line 141 of file DBObject.h.

Referenced by Catalog_Namespace::SysCatalog::migratePrivileges().

const AccessPrivileges AccessPrivileges::SELECT_FROM_VIEW
static
const AccessPrivileges AccessPrivileges::TRUNCATE_TABLE
static
const AccessPrivileges AccessPrivileges::TRUNCATE_VIEW
static
Initial value:

Definition at line 177 of file DBObject.h.

const AccessPrivileges AccessPrivileges::UPDATE_IN_TABLE
static
Initial value:

Definition at line 155 of file DBObject.h.

Referenced by Parser::parseStringPrivs(), and Calcite::process().

const AccessPrivileges AccessPrivileges::UPDATE_IN_VIEW
static
Initial value:

Definition at line 175 of file DBObject.h.


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