MongoDB  2.7.0
admin_access.h
Go to the documentation of this file.
1 
32 #pragma once
33 
34 #include "mongo/db/jsobj.h"
35 #include "mongo/db/auth/user_name.h"
36 
37 namespace mongo {
38 
39  /*
40  * An AdminAccess is an interface class used to determine if certain users have
41  * privileges to a given resource.
42  *
43  */
44  class AdminAccess {
45  public:
46  virtual ~AdminAccess() { }
47 
51  virtual bool haveAdminUsers() const = 0;
52  };
53 
54  class NoAdminAccess : public AdminAccess {
55  public:
56  virtual ~NoAdminAccess() { }
57 
58  virtual bool haveAdminUsers() const { return false; }
59  };
60 
61 } // namespace mongo
BSON classes.
Definition: admin_access.h:44
virtual bool haveAdminUsers() const
Definition: admin_access.h:58
Definition: admin_access.h:54
virtual bool haveAdminUsers() const =0