~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/simple_user_policy/policy.h

Merge Monty - Added inter-plugin dependencies for controlling plugin load order

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 */
19
19
 
20
20
 
21
 
#pragma once
 
21
#ifndef PLUGIN_SIMPLE_USER_POLICY_POLICY_H
 
22
#define PLUGIN_SIMPLE_USER_POLICY_POLICY_H
22
23
 
23
24
#include <iostream>
24
25
 
36
37
  { }
37
38
 
38
39
  virtual bool restrictSchema(const drizzled::identifier::User &user_ctx,
39
 
                              const drizzled::identifier::Schema& schema);
 
40
                              drizzled::identifier::Schema::const_reference schema);
40
41
 
41
42
  virtual bool restrictProcess(const drizzled::identifier::User &user_ctx,
42
43
                               const drizzled::identifier::User &session_ctx);
43
44
};
44
45
 
45
46
inline bool Policy::restrictSchema(const drizzled::identifier::User &user_ctx,
46
 
                                   const drizzled::identifier::Schema& schema)
 
47
                                   drizzled::identifier::Schema::const_reference schema)
47
48
{
48
49
  if ((user_ctx.username() == "root")
49
50
      || schema.compare("data_dictionary")
66
67
 
67
68
} /* namespace simple_user_policy */
68
69
 
 
70
#endif /* PLUGIN_SIMPLE_USER_POLICY_POLICY_H */