OmniSciDB  06b3bd477c
 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
 
static const AccessPrivileges ALL_SERVER
 
static const AccessPrivileges CREATE_SERVER
 
static const AccessPrivileges DROP_SERVER
 
static const AccessPrivileges ALTER_SERVER
 

Detailed Description

Definition at line 133 of file DBObject.h.

Constructor & Destructor Documentation

AccessPrivileges::AccessPrivileges ( )
inline

Definition at line 136 of file DBObject.h.

136 : privileges(0) {}
int64_t privileges
Definition: DBObject.h:134
AccessPrivileges::AccessPrivileges ( int64_t  priv)
inline

Definition at line 138 of file DBObject.h.

138 : privileges(priv) {}
int64_t privileges
Definition: DBObject.h:134

Member Function Documentation

void AccessPrivileges::add ( AccessPrivileges  newprivs)
inline

Definition at line 146 of file DBObject.h.

References privileges.

Referenced by DBHandler::shareOrUnshareDashboards().

146 { privileges |= newprivs.privileges; }
int64_t privileges
Definition: DBObject.h:134

+ Here is the caller graph for this function:

bool AccessPrivileges::hasAny ( ) const
inline

Definition at line 141 of file DBObject.h.

References privileges.

Referenced by checkPermissionForTables(), and hasAnyPrivs().

141 { return 0L != privileges; }
int64_t privileges
Definition: DBObject.h:134

+ Here is the caller graph for this function:

bool AccessPrivileges::hasPermission ( int  permission) const
inline

Definition at line 142 of file DBObject.h.

References privileges.

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

142  {
143  return permission == (privileges & permission);
144  }
int64_t privileges
Definition: DBObject.h:134

+ Here is the caller graph for this function:

void AccessPrivileges::remove ( AccessPrivileges  newprivs)
inline

Definition at line 147 of file DBObject.h.

References privileges.

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

Definition at line 140 of file DBObject.h.

References privileges.

Referenced by DBObject::resetPrivileges().

140 { privileges = 0L; }
int64_t privileges
Definition: DBObject.h:134

+ 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_SERVER
static
const AccessPrivileges AccessPrivileges::ALTER_TABLE
static
const AccessPrivileges AccessPrivileges::CREATE_DASHBOARD
static
const AccessPrivileges AccessPrivileges::CREATE_SERVER
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 184 of file DBObject.h.

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

Definition at line 182 of file DBObject.h.

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

Definition at line 149 of file DBObject.h.

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

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

Definition at line 185 of file DBObject.h.

const AccessPrivileges AccessPrivileges::UPDATE_IN_TABLE
static
const AccessPrivileges AccessPrivileges::UPDATE_IN_VIEW
static
Initial value:

Definition at line 183 of file DBObject.h.


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