~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/authorization.h

  • Committer: Monty Taylor
  • Date: 2010-04-15 19:13:57 UTC
  • mto: This revision was merged to the branch mainline in revision 1476.
  • Revision ID: mordred@inaugust.com-20100415191357-alvsmwpe1dql9ll5
Updated Authorization plugin interface to use new Schema|TableIdentifier
code.
Also - fixed Authorization::pruneSchemaNames to use stl's remove_if and
erase to properly trim down the set.

Show diffs side-by-side

added added

removed removed

Lines of Context:
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?
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 */
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 &,