~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/authorization.h

  • Committer: Brian Aker
  • Date: 2011-02-12 06:56:00 UTC
  • mto: This revision was merged to the branch mainline in revision 2161.
  • Revision ID: brian@tangent.org-20110212065600-m6c68fybw51rflhj
Further strip out includes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
#include <string>
30
30
#include <set>
31
31
 
 
32
#include "drizzled/visibility.h"
 
33
 
32
34
namespace drizzled
33
35
{
34
36
 
35
37
namespace plugin
36
38
{
37
39
 
38
 
class Authorization : public Plugin
 
40
class DRIZZLED_API Authorization : public Plugin
39
41
{
40
42
  Authorization();
41
43
  Authorization(const Authorization &);
55
57
   * @returns true if the user cannot access the schema
56
58
   */
57
59
  virtual bool restrictSchema(const drizzled::identifier::User &user_ctx,
58
 
                              SchemaIdentifier::const_reference schema)= 0;
 
60
                              identifier::Schema::const_reference schema)= 0;
59
61
 
60
62
  /**
61
63
   * Should we restrict the current user's access to this table?
67
69
   * @returns true if the user cannot access the table
68
70
   */
69
71
  virtual bool restrictTable(const drizzled::identifier::User &user_ctx,
70
 
                             TableIdentifier &table);
 
72
                             identifier::Table &table);
71
73
 
72
74
  /**
73
75
   * Should we restrict the current user's access to see this process?
83
85
 
84
86
  /** Server API method for checking schema authorization */
85
87
  static bool isAuthorized(drizzled::identifier::User::const_shared_ptr user_ctx,
86
 
                           SchemaIdentifier::const_reference schema_identifier,
 
88
                           identifier::Schema::const_reference schema_identifier,
87
89
                           bool send_error= true);
88
90
 
89
91
  /** Server API method for checking table authorization */
90
92
  static bool isAuthorized(drizzled::identifier::User::const_shared_ptr user_ctx,
91
 
                           TableIdentifier &table_identifier,
 
93
                           identifier::Table &table_identifier,
92
94
                           bool send_error= true);
93
95
 
94
96
  /** Server API method for checking process authorization */
96
98
                           const Session *session,
97
99
                           bool send_error= true);
98
100
 
 
101
  /** Server API method for checking process authorization */
 
102
  static bool isAuthorized(drizzled::identifier::User::const_reference user_ctx,
 
103
                           const Session *session,
 
104
                           bool send_error= true);
 
105
 
99
106
  /**
100
107
   * Server API helper method for applying authorization tests
101
108
   * to a set of schema names (for use in the context of getSchemaNames
102
109
   */
103
110
  static void pruneSchemaNames(drizzled::identifier::User::const_shared_ptr user_ctx,
104
 
                               SchemaIdentifier::vector &set_of_schemas);
 
111
                               identifier::Schema::vector &set_of_schemas);
105
112
  
106
113
  /**
107
114
   * Standard plugin system registration hooks
112
119
};
113
120
 
114
121
inline bool Authorization::restrictTable(const drizzled::identifier::User &user_ctx,
115
 
                                         TableIdentifier &table)
 
122
                                         identifier::Table &table)
116
123
{
117
124
  return restrictSchema(user_ctx, table);
118
125
}