Drizzled Public API Documentation

regex_policy::Policy Class Reference
Inheritance diagram for regex_policy::Policy:
drizzled::plugin::Authorization drizzled::plugin::Plugin

List of all members.

Public Types

typedef std::pair< const
std::string, const std::string > 
map_key
typedef std::map< const
map_key, plugin::Plugin * > 
map
typedef std::vector< Plugin * > vector

Public Member Functions

 Policy (const fs::path &f_path)
virtual bool restrictSchema (const drizzled::identifier::User &user_ctx, drizzled::identifier::Schema::const_reference schema)
virtual bool restrictProcess (const drizzled::identifier::User &user_ctx, const drizzled::identifier::User &session_ctx)
virtual bool restrictTable (drizzled::identifier::User::const_reference user_ctx, drizzled::identifier::Table::const_reference table)
bool loadFile ()
std::stringstream & getError ()
virtual void shutdownPlugin ()
virtual void prime ()
virtual void startup (drizzled::Session &)
void activate ()
void deactivate ()
bool isActive () const
const std::string & getName () const
void setModule (module::Module *module)
const std::string & getTypeName () const
virtual bool removeLast () const
const std::string & getModuleName () const

Static Public Member Functions

static bool isAuthorized (drizzled::identifier::User::const_reference user_ctx, identifier::Schema::const_reference schema_identifier, bool send_error=true)
static bool isAuthorized (drizzled::identifier::User::const_reference user_ctx, drizzled::identifier::Table::const_reference table_identifier, bool send_error=true)
static bool isAuthorized (drizzled::identifier::User::const_reference user_ctx, const Session &session, bool send_error=true)
static void pruneSchemaNames (drizzled::identifier::User::const_reference user_ctx, identifier::Schema::vector &set_of_schemas)
static bool addPlugin (plugin::Authorization *auth)
static void removePlugin (plugin::Authorization *auth)

Private Member Functions

bool restrictObject (const drizzled::identifier::User &user_ctx, const std::string &obj, const PolicyItemList &policies, CheckMap **check_cache)

Private Attributes

fs::path policy_file
std::stringstream error
PolicyItemList table_policies
PolicyItemList schema_policies
PolicyItemList process_policies
CheckMap * table_check_cache
CheckMap * schema_check_cache
CheckMap * process_check_cache

Detailed Description

Definition at line 148 of file policy.h.


Member Function Documentation

Standard plugin system registration hooks

Definition at line 37 of file authorization.cc.

bool drizzled::plugin::Authorization::isAuthorized ( drizzled::identifier::User::const_reference  user_ctx,
identifier::Schema::const_reference  schema_identifier,
bool  send_error = true 
) [static, inherited]

Server API method for checking schema authorization

Definition at line 134 of file authorization.cc.

Referenced by drizzled::Session::isViewable().

bool drizzled::plugin::Authorization::isAuthorized ( drizzled::identifier::User::const_reference  user_ctx,
drizzled::identifier::Table::const_reference  table_identifier,
bool  send_error = true 
) [static, inherited]

Server API method for checking table authorization

Definition at line 165 of file authorization.cc.

static bool drizzled::plugin::Authorization::isAuthorized ( drizzled::identifier::User::const_reference  user_ctx,
const Session session,
bool  send_error = true 
) [static, inherited]

Server API method for checking process authorization

void drizzled::plugin::Authorization::pruneSchemaNames ( drizzled::identifier::User::const_reference  user_ctx,
identifier::Schema::vector &  set_of_schemas 
) [static, inherited]

Server API helper method for applying authorization tests to a set of schema names (for use in the context of getSchemaNames

Definition at line 232 of file authorization.cc.

bool regex_policy::Policy::restrictProcess ( const drizzled::identifier::User user_ctx,
const drizzled::identifier::User session_ctx 
) [virtual]

Should we restrict the current user's access to see this process?

Parameters:
Currentsecurity context
Databaseto check against
Tableto check against
Returns:
true if the user cannot see the process

Reimplemented from drizzled::plugin::Authorization.

Definition at line 205 of file module.cc.

Should we restrict the current user's access to this schema?

Parameters:
Currentsecurity context
Databaseto check against
Returns:
true if the user cannot access the schema

Implements drizzled::plugin::Authorization.

Definition at line 199 of file module.cc.

Should we restrict the current user's access to this table?

Parameters:
Currentsecurity context
Databaseto check against
Tableto check against
Returns:
true if the user cannot access the table

Reimplemented from drizzled::plugin::Authorization.

Definition at line 211 of file module.cc.


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