~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/authorization.h

updating to trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
68
68
   *
69
69
   * @returns true if the user cannot access the table
70
70
   */
71
 
  virtual bool restrictTable(const drizzled::identifier::User &user_ctx,
72
 
                             identifier::Table &table);
 
71
  virtual bool restrictTable(drizzled::identifier::User::const_reference user_ctx,
 
72
                             drizzled::identifier::Table::const_reference 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_shared_ptr user_ctx,
 
87
  static bool isAuthorized(drizzled::identifier::User::const_reference 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_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,
 
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,
104
99
                           bool send_error= true);
105
100
 
106
101
  /**
107
102
   * Server API helper method for applying authorization tests
108
103
   * to a set of schema names (for use in the context of getSchemaNames
109
104
   */
110
 
  static void pruneSchemaNames(drizzled::identifier::User::const_shared_ptr user_ctx,
 
105
  static void pruneSchemaNames(drizzled::identifier::User::const_reference user_ctx,
111
106
                               identifier::Schema::vector &set_of_schemas);
112
107
  
113
108
  /**
118
113
 
119
114
};
120
115
 
121
 
inline bool Authorization::restrictTable(const drizzled::identifier::User &user_ctx,
122
 
                                         identifier::Table &table)
 
116
inline bool Authorization::restrictTable(drizzled::identifier::User::const_reference user_ctx,
 
117
                                         drizzled::identifier::Table::const_reference table)
123
118
{
124
119
  return restrictSchema(user_ctx, table);
125
120
}