OmniSciDB  a5dc49c757
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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
 
static const AccessPrivileges SERVER_USAGE
 

Detailed Description

Definition at line 132 of file DBObject.h.

Constructor & Destructor Documentation

AccessPrivileges::AccessPrivileges ( )
inline

Definition at line 135 of file DBObject.h.

135 : privileges(0) {}
int64_t privileges
Definition: DBObject.h:133
AccessPrivileges::AccessPrivileges ( int64_t  priv)
inline

Definition at line 137 of file DBObject.h.

137 : privileges(priv) {}
int64_t privileges
Definition: DBObject.h:133

Member Function Documentation

void AccessPrivileges::add ( AccessPrivileges  newprivs)
inline

Definition at line 145 of file DBObject.h.

References privileges.

Referenced by DBHandler::shareOrUnshareDashboards().

145 { privileges |= newprivs.privileges; }
int64_t privileges
Definition: DBObject.h:133

+ Here is the caller graph for this function:

bool AccessPrivileges::hasAny ( ) const
inline

Definition at line 140 of file DBObject.h.

References privileges.

Referenced by anonymous_namespace{Calcite.cpp}::checkPermissionForTables(), and hasAnyPrivs().

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

+ Here is the caller graph for this function:

bool AccessPrivileges::hasPermission ( int  permission) const
inline

Definition at line 141 of file DBObject.h.

References privileges.

Referenced by Parser::ShowPrivilegesStmt::execute(), DBHandler::get_dashboard_impl(), foreign_storage::anonymous_namespace{InternalCatalogDataWrapper.cpp}::get_permissions(), DBHandler::has_dashboard_permission(), DBHandler::has_database_permission(), DBHandler::has_server_permission(), DBHandler::has_table_permission(), and DBHandler::has_view_permission().

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

+ Here is the caller graph for this function:

void AccessPrivileges::remove ( AccessPrivileges  newprivs)
inline

Definition at line 146 of file DBObject.h.

References privileges.

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

Definition at line 139 of file DBObject.h.

References privileges.

Referenced by DBObject::resetPrivileges().

139 { privileges = 0L; }
int64_t privileges
Definition: DBObject.h:133

+ 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::DELETE_FROM_VIEW
static
Initial value:

Definition at line 183 of file DBObject.h.

const AccessPrivileges AccessPrivileges::INSERT_INTO_VIEW
static
Initial value:

Definition at line 181 of file DBObject.h.

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

Definition at line 148 of file DBObject.h.

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

const AccessPrivileges AccessPrivileges::TRUNCATE_VIEW
static
Initial value:

Definition at line 184 of file DBObject.h.

const AccessPrivileges AccessPrivileges::UPDATE_IN_VIEW
static
Initial value:

Definition at line 182 of file DBObject.h.


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