~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/authorization.h

  • Committer: Brian Aker
  • Date: 2011-03-24 23:14:46 UTC
  • mfrom: (2246.4.12 foreach)
  • Revision ID: brian@tangent.org-20110324231446-7q1gydkglys73nft
Merge in XTF

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 drizzled::identifier::User &user_ctx,
59
 
                              identifier::Schema::const_reference schema)= 0;
 
59
                              const identifier::Schema& schema)= 0;
60
60
 
61
61
  /**
62
62
   * Should we restrict the current user's access to this table?
67
67
   *
68
68
   * @returns true if the user cannot access the table
69
69
   */
70
 
  virtual bool restrictTable(drizzled::identifier::User::const_reference user_ctx,
71
 
                             drizzled::identifier::Table::const_reference table);
 
70
  virtual bool restrictTable(const drizzled::identifier::User& user_ctx,
 
71
                             const drizzled::identifier::Table& table);
72
72
 
73
73
  /**
74
74
   * Should we restrict the current user's access to see this process?
83
83
                               const drizzled::identifier::User &session_ctx);
84
84
 
85
85
  /** Server API method for checking schema authorization */
86
 
  static bool isAuthorized(drizzled::identifier::User::const_reference user_ctx,
87
 
                           identifier::Schema::const_reference schema_identifier,
 
86
  static bool isAuthorized(const drizzled::identifier::User& user_ctx,
 
87
                           const identifier::Schema& schema_identifier,
88
88
                           bool send_error= true);
89
89
 
90
90
  /** Server API method for checking table authorization */
91
 
  static bool isAuthorized(drizzled::identifier::User::const_reference user_ctx,
92
 
                           drizzled::identifier::Table::const_reference table_identifier,
 
91
  static bool isAuthorized(const drizzled::identifier::User& user_ctx,
 
92
                           const drizzled::identifier::Table& table_identifier,
93
93
                           bool send_error= true);
94
94
 
95
95
  /** Server API method for checking process authorization */
96
 
  static bool isAuthorized(drizzled::identifier::User::const_reference user_ctx,
 
96
  static bool isAuthorized(const drizzled::identifier::User& user_ctx,
97
97
                           const Session &session,
98
98
                           bool send_error= true);
99
99
 
101
101
   * Server API helper method for applying authorization tests
102
102
   * to a set of schema names (for use in the context of getSchemaNames
103
103
   */
104
 
  static void pruneSchemaNames(drizzled::identifier::User::const_reference user_ctx,
 
104
  static void pruneSchemaNames(const drizzled::identifier::User& user_ctx,
105
105
                               identifier::Schema::vector &set_of_schemas);
106
106
  
107
107
  /**
112
112
 
113
113
};
114
114
 
115
 
inline bool Authorization::restrictTable(drizzled::identifier::User::const_reference user_ctx,
116
 
                                         drizzled::identifier::Table::const_reference table)
 
115
inline bool Authorization::restrictTable(const drizzled::identifier::User& user_ctx,
 
116
                                         const drizzled::identifier::Table& table)
117
117
{
118
118
  return restrictSchema(user_ctx, table);
119
119
}