~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/authorization.h

  • Committer: Monty Taylor
  • Date: 2011-02-13 17:26:39 UTC
  • mfrom: (2157.2.2 give-in-to-pkg-config)
  • mto: This revision was merged to the branch mainline in revision 2166.
  • Revision ID: mordred@inaugust.com-20110213172639-nhy7i72sfhoq13ms
Merged in pkg-config fixes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
#ifndef DRIZZLED_PLUGIN_AUTHORIZATION_H
23
23
#define DRIZZLED_PLUGIN_AUTHORIZATION_H
24
24
 
25
 
#include <drizzled/plugin.h>
26
 
#include <drizzled/plugin/plugin.h>
27
 
#include <drizzled/identifier.h>
 
25
#include "drizzled/plugin.h"
 
26
#include "drizzled/plugin/plugin.h"
 
27
#include "drizzled/identifier.h"
28
28
 
29
29
#include <string>
30
30
#include <set>
31
31
 
32
 
#include <drizzled/visibility.h>
 
32
#include "drizzled/visibility.h"
33
33
 
34
34
namespace drizzled
35
35
{
68
68
   *
69
69
   * @returns true if the user cannot access the table
70
70
   */
71
 
  virtual bool restrictTable(drizzled::identifier::User::const_reference user_ctx,
72
 
                             drizzled::identifier::Table::const_reference table);
 
71
  virtual bool restrictTable(const drizzled::identifier::User &user_ctx,
 
72
                             identifier::Table &table);
73
73
 
74
74
  /**
75
75
   * Should we restrict the current user's access to see this process?
84
84
                               const drizzled::identifier::User &session_ctx);
85
85
 
86
86
  /** Server API method for checking schema authorization */
87
 
  static bool isAuthorized(drizzled::identifier::User::const_reference user_ctx,
 
87
  static bool isAuthorized(drizzled::identifier::User::const_shared_ptr user_ctx,
88
88
                           identifier::Schema::const_reference schema_identifier,
89
89
                           bool send_error= true);
90
90
 
91
91
  /** Server API method for checking table authorization */
92
 
  static bool isAuthorized(drizzled::identifier::User::const_reference user_ctx,
93
 
                           drizzled::identifier::Table::const_reference table_identifier,
94
 
                           bool send_error= true);
95
 
 
96
 
  /** Server API method for checking process authorization */
97
 
  static bool isAuthorized(drizzled::identifier::User::const_reference user_ctx,
98
 
                           const Session &session,
 
92
  static bool isAuthorized(drizzled::identifier::User::const_shared_ptr user_ctx,
 
93
                           identifier::Table &table_identifier,
 
94
                           bool send_error= true);
 
95
 
 
96
  /** Server API method for checking process authorization */
 
97
  static bool isAuthorized(drizzled::identifier::User::const_shared_ptr user_ctx,
 
98
                           const Session *session,
 
99
                           bool send_error= true);
 
100
 
 
101
  /** Server API method for checking process authorization */
 
102
  static bool isAuthorized(drizzled::identifier::User::const_reference user_ctx,
 
103
                           const Session *session,
99
104
                           bool send_error= true);
100
105
 
101
106
  /**
102
107
   * Server API helper method for applying authorization tests
103
108
   * to a set of schema names (for use in the context of getSchemaNames
104
109
   */
105
 
  static void pruneSchemaNames(drizzled::identifier::User::const_reference user_ctx,
 
110
  static void pruneSchemaNames(drizzled::identifier::User::const_shared_ptr user_ctx,
106
111
                               identifier::Schema::vector &set_of_schemas);
107
112
  
108
113
  /**
113
118
 
114
119
};
115
120
 
116
 
inline bool Authorization::restrictTable(drizzled::identifier::User::const_reference user_ctx,
117
 
                                         drizzled::identifier::Table::const_reference table)
 
121
inline bool Authorization::restrictTable(const drizzled::identifier::User &user_ctx,
 
122
                                         identifier::Table &table)
118
123
{
119
124
  return restrictSchema(user_ctx, table);
120
125
}