~ubuntu-branches/ubuntu/trusty/drizzle/trusty

« back to all changes in this revision

Viewing changes to drizzled/plugin/authorization.h

  • Committer: Bazaar Package Importer
  • Author(s): Monty Taylor
  • Date: 2010-10-02 14:17:48 UTC
  • mfrom: (1.1.1 upstream)
  • mto: (2.1.17 sid)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20101002141748-m6vbfbfjhrw1153e
Tags: 2010.09.1802-1
* New upstream release.
* Removed pid-file argument hack.
* Updated GPL-2 address to be new address.
* Directly copy in drizzledump.1 since debian doesn't have sphinx 1.0 yet.
* Link to jquery from libjs-jquery. Add it as a depend.
* Add drizzled.8 symlink to the install files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
#include "drizzled/plugin.h"
26
26
#include "drizzled/plugin/plugin.h"
27
27
#include "drizzled/security_context.h"
28
 
#include "drizzled/table_identifier.h"
 
28
#include "drizzled/identifier.h"
29
29
 
30
30
#include <string>
31
31
#include <set>
56
56
   * @returns true if the user cannot access the schema
57
57
   */
58
58
  virtual bool restrictSchema(const SecurityContext &user_ctx,
59
 
                              const std::string &schema)= 0;
 
59
                              SchemaIdentifier &schema)= 0;
60
60
 
61
61
  /**
62
62
   * Should we restrict the current user's access to this table?
68
68
   * @returns true if the user cannot access the table
69
69
   */
70
70
  virtual bool restrictTable(const SecurityContext &user_ctx,
71
 
                             const std::string &schema,
72
 
                             const std::string &table);
 
71
                             TableIdentifier &table);
73
72
 
74
73
  /**
75
74
   * Should we restrict the current user's access to see this process?
85
84
 
86
85
  /** Server API method for checking schema authorization */
87
86
  static bool isAuthorized(const SecurityContext &user_ctx,
88
 
                           const std::string &schema,
 
87
                           SchemaIdentifier &schema_identifier,
89
88
                           bool send_error= true);
90
89
 
91
90
  /** Server API method for checking table authorization */
92
91
  static bool isAuthorized(const SecurityContext &user_ctx,
93
 
                           const std::string &schema,
94
 
                           const std::string &table,
 
92
                           TableIdentifier &table_identifier,
95
93
                           bool send_error= true);
96
94
 
97
95
  /** Server API method for checking process authorization */
104
102
   * to a set of schema names (for use in the context of getSchemaNames
105
103
   */
106
104
  static void pruneSchemaNames(const SecurityContext &user_ctx,
107
 
                               std::set<std::string> &set_of_names);
 
105
                               SchemaIdentifiers &set_of_schemas);
108
106
  
109
107
  /**
110
108
   * Standard plugin system registration hooks
115
113
};
116
114
 
117
115
inline bool Authorization::restrictTable(const SecurityContext &user_ctx,
118
 
                                         const std::string &schema,
119
 
                                         const std::string &)
 
116
                                         TableIdentifier &table)
120
117
{
121
 
  return restrictSchema(user_ctx, schema);
 
118
  return restrictSchema(user_ctx, table);
122
119
}
123
120
 
124
121
inline bool Authorization::restrictProcess(const SecurityContext &,