~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/simple_user_policy/policy.h

  • Committer: Mark Atwood
  • Date: 2011-08-11 03:05:03 UTC
  • mfrom: (2385.1.12 refactor4)
  • Revision ID: me@mark.atwood.name-20110811030503-rp9xjihc5x3y0x4q
merge lp:~olafvdspek/drizzle/refactor4

Show diffs side-by-side

added added

removed removed

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