~sharan-monikantan/drizzle/crashme

« back to all changes in this revision

Viewing changes to plugin/regex_policy/policy.h

  • Committer: Continuous Integration
  • Date: 2012-06-10 01:35:57 UTC
  • mfrom: (2564.1.2 regex_policy_dynamic1)
  • Revision ID: ci@drizzle.org-20120610013557-sm3bov5vn8egirf9
added:
  plugin/regex_policy/tests/r/dynamic_plugin.result
  plugin/regex_policy/tests/t/dynamic.policy1
  plugin/regex_policy/tests/t/dynamic.policy2
  plugin/regex_policy/tests/t/dynamic.policy3
  plugin/regex_policy/tests/t/dynamic_plugin-master.opt
  plugin/regex_policy/tests/t/dynamic_plugin.test
modified:
  plugin/regex_policy/docs/index.rst
  plugin/regex_policy/module.cc
  plugin/regex_policy/policy.h
pending merge tips: (use -v to see all merge revisions)
  Anshu Kumar 2012-06-06 Change in some variable names to avoid confusions.

Show diffs side-by-side

added added

removed removed

Lines of Context:
118
118
public:
119
119
  bool* find(std::string const&k);
120
120
  void insert(std::string const &k, bool v);
 
121
  void clear()
 
122
  {
 
123
        map.clear();
 
124
  }
121
125
};
122
126
 
123
127
class CheckItem
161
165
  public drizzled::plugin::Authorization
162
166
{
163
167
public:
164
 
  Policy(const fs::path &f_path) :
165
 
    drizzled::plugin::Authorization("regex_policy"), policy_file(f_path), error(),
 
168
  Policy(const std::string &f_path) :
 
169
    drizzled::plugin::Authorization("regex_policy"), sysvar_policy_file(f_path), policy_file(f_path), error(),
166
170
    table_check_cache(), schema_check_cache(), process_check_cache()
167
171
  { }
168
172
 
175
179
  virtual bool restrictTable(const drizzled::identifier::User& user_ctx,
176
180
                             const drizzled::identifier::Table& table);
177
181
 
178
 
  bool loadFile();
 
182
  void setPolicies(PolicyItemList new_table_policies, PolicyItemList new_schema_policies, PolicyItemList new_process_policies);
 
183
  void clearPolicies();
 
184
  std::string& getPolicyFile();
 
185
  bool setPolicyFile(std::string& new_policy_file);
179
186
  std::stringstream &getError() { return error; }
180
187
  ~Policy();
181
188
private:
182
189
  bool restrictObject(const drizzled::identifier::User &user_ctx,
183
190
                                   const std::string &obj, const PolicyItemList &policies,
184
191
                                   CheckMap &check_cache);
 
192
  std::string sysvar_policy_file;
185
193
  fs::path policy_file;
186
 
 
187
194
  std::stringstream error;
188
195
  PolicyItemList table_policies;
189
196
  PolicyItemList schema_policies;