OmniSciDB  04ee39c94c
Users Struct Reference

Public Member Functions

void setup_users ()
 
void drop_users ()
 
 Users ()
 
virtual ~Users ()
 

Detailed Description

Definition at line 47 of file DBObjectPrivilegesTest.cpp.

Constructor & Destructor Documentation

◆ Users()

Users::Users ( )
inline

Definition at line 84 of file DBObjectPrivilegesTest.cpp.

References setup_users().

84 { setup_users(); }
+ Here is the call graph for this function:

◆ ~Users()

virtual Users::~Users ( )
inlinevirtual

Definition at line 85 of file DBObjectPrivilegesTest.cpp.

References drop_users().

85 { drop_users(); }
+ Here is the call graph for this function:

Member Function Documentation

◆ drop_users()

void Users::drop_users ( )
inline

Definition at line 66 of file DBObjectPrivilegesTest.cpp.

References CHECK, anonymous_namespace{DBObjectPrivilegesTest.cpp}::sys_cat, and anonymous_namespace{DBObjectPrivilegesTest.cpp}::user.

Referenced by ~Users().

66  {
67  if (sys_cat.getMetadataForUser("Chelsea", user)) {
68  sys_cat.dropUser("Chelsea");
69  CHECK(!sys_cat.getMetadataForUser("Chelsea", user));
70  }
71  if (sys_cat.getMetadataForUser("Arsenal", user)) {
72  sys_cat.dropUser("Arsenal");
73  CHECK(!sys_cat.getMetadataForUser("Arsenal", user));
74  }
75  if (sys_cat.getMetadataForUser("Juventus", user)) {
76  sys_cat.dropUser("Juventus");
77  CHECK(!sys_cat.getMetadataForUser("Juventus", user));
78  }
79  if (sys_cat.getMetadataForUser("Bayern", user)) {
80  sys_cat.dropUser("Bayern");
81  CHECK(!sys_cat.getMetadataForUser("Bayern", user));
82  }
83  }
#define CHECK(condition)
Definition: Logger.h:187
+ Here is the caller graph for this function:

◆ setup_users()

void Users::setup_users ( )
inline

Definition at line 48 of file DBObjectPrivilegesTest.cpp.

References CHECK, anonymous_namespace{DBObjectPrivilegesTest.cpp}::sys_cat, and anonymous_namespace{DBObjectPrivilegesTest.cpp}::user.

Referenced by Users().

48  {
49  if (!sys_cat.getMetadataForUser("Chelsea", user)) {
50  sys_cat.createUser("Chelsea", "password", true, "");
51  CHECK(sys_cat.getMetadataForUser("Chelsea", user));
52  }
53  if (!sys_cat.getMetadataForUser("Arsenal", user)) {
54  sys_cat.createUser("Arsenal", "password", false, "");
55  CHECK(sys_cat.getMetadataForUser("Arsenal", user));
56  }
57  if (!sys_cat.getMetadataForUser("Juventus", user)) {
58  sys_cat.createUser("Juventus", "password", false, "");
59  CHECK(sys_cat.getMetadataForUser("Juventus", user));
60  }
61  if (!sys_cat.getMetadataForUser("Bayern", user)) {
62  sys_cat.createUser("Bayern", "password", false, "");
63  CHECK(sys_cat.getMetadataForUser("Bayern", user));
64  }
65  }
#define CHECK(condition)
Definition: Logger.h:187
+ Here is the caller graph for this function:

The documentation for this struct was generated from the following file: