~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/regex_policy/policy.h

  • Committer: Mark Atwood
  • Date: 2011-08-21 06:56:57 UTC
  • mfrom: (2385.3.34 rf)
  • Revision ID: me@mark.atwood.name-20110821065657-vk2at03z9u17mf1d
mergeĀ lp:~olafvdspek/drizzle/refactor7

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
 
36
36
namespace fs= boost::filesystem;
37
37
 
38
 
namespace regex_policy
39
 
{
 
38
namespace regex_policy {
40
39
 
41
40
static const fs::path DEFAULT_POLICY_FILE= SYSCONFDIR "/drizzle.policy";
42
41
 
85
84
  }
86
85
  bool userMatches(std::string &str);
87
86
  bool objectMatches(std::string &object_id);
88
 
  bool isRestricted();
 
87
  bool isRestricted() const;
89
88
  const std::string&getUser() const
90
89
  {
91
90
    return user;
137
136
  return boost::regex_match(object_id, object_re);
138
137
}
139
138
 
140
 
inline bool PolicyItem::isRestricted()
 
139
inline bool PolicyItem::isRestricted() const
141
140
{
142
141
  return action == POLICY_DENY;
143
142
}