~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/authorization.cc

  • Committer: Brian Aker
  • Date: 2010-12-03 18:46:31 UTC
  • mto: This revision was merged to the branch mainline in revision 1973.
  • Revision ID: brian@tangent.org-20101203184631-rk40syiqbaitq9h8
Remove the use of "using std" from the plugin interface .cc files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
#include "drizzled/session.h"
30
30
#include "drizzled/gettext.h"
31
31
 
32
 
using namespace std;
33
 
 
34
32
namespace drizzled
35
33
{
36
34
 
58
56
{
59
57
 
60
58
class RestrictDbFunctor :
61
 
  public unary_function<plugin::Authorization *, bool>
 
59
  public std::unary_function<plugin::Authorization *, bool>
62
60
{
63
61
  const SecurityContext &user_ctx;
64
62
  SchemaIdentifier &schema;
65
63
public:
66
64
  RestrictDbFunctor(const SecurityContext &user_ctx_arg,
67
65
                    SchemaIdentifier &schema_arg) :
68
 
    unary_function<plugin::Authorization *, bool>(),
 
66
    std::unary_function<plugin::Authorization *, bool>(),
69
67
    user_ctx(user_ctx_arg),
70
68
    schema(schema_arg)
71
69
  { }
77
75
};
78
76
 
79
77
class RestrictTableFunctor :
80
 
  public unary_function<plugin::Authorization *, bool>
 
78
  public std::unary_function<plugin::Authorization *, bool>
81
79
{
82
80
  const SecurityContext &user_ctx;
83
81
  TableIdentifier &table;
84
82
public:
85
83
  RestrictTableFunctor(const SecurityContext &user_ctx_arg,
86
84
                       TableIdentifier &table_arg) :
87
 
    unary_function<plugin::Authorization *, bool>(),
 
85
    std::unary_function<plugin::Authorization *, bool>(),
88
86
    user_ctx(user_ctx_arg),
89
87
    table(table_arg)
90
88
  { }
96
94
};
97
95
 
98
96
class RestrictProcessFunctor :
99
 
  public unary_function<plugin::Authorization *, bool>
 
97
  public std::unary_function<plugin::Authorization *, bool>
100
98
{
101
99
  const SecurityContext &user_ctx;
102
100
  const SecurityContext &session_ctx;
103
101
public:
104
102
  RestrictProcessFunctor(const SecurityContext &user_ctx_arg,
105
103
                         const SecurityContext &session_ctx_arg) :
106
 
    unary_function<plugin::Authorization *, bool>(),
 
104
    std::unary_function<plugin::Authorization *, bool>(),
107
105
    user_ctx(user_ctx_arg),
108
106
    session_ctx(session_ctx_arg)
109
107
  { }
115
113
};
116
114
 
117
115
class PruneSchemaFunctor :
118
 
  public unary_function<SchemaIdentifier&, bool>
 
116
  public std::unary_function<SchemaIdentifier&, bool>
119
117
{
120
118
  const SecurityContext &user_ctx;
121
119
public:
122
120
  PruneSchemaFunctor(const SecurityContext &user_ctx_arg) :
123
 
    unary_function<SchemaIdentifier&, bool>(),
 
121
    std::unary_function<SchemaIdentifier&, bool>(),
124
122
    user_ctx(user_ctx_arg)
125
123
  { }
126
124
 
142
140
 
143
141
  /* Use find_if instead of foreach so that we can collect return codes */
144
142
  std::vector<plugin::Authorization *>::const_iterator iter=
145
 
    find_if(authorization_plugins.begin(),
146
 
            authorization_plugins.end(),
147
 
            RestrictDbFunctor(user_ctx, schema_identifier));
 
143
    std::find_if(authorization_plugins.begin(),
 
144
                 authorization_plugins.end(),
 
145
                 RestrictDbFunctor(user_ctx, schema_identifier));
148
146
 
149
147
 
150
148
  /*