OmniSciDB  c07336695a
Roles Struct Reference

Public Member Functions

void setup_roles ()
 
void drop_roles ()
 
 Roles ()
 
virtual ~Roles ()
 

Detailed Description

Definition at line 87 of file DBObjectPrivilegesTest.cpp.

Constructor & Destructor Documentation

◆ Roles()

Roles::Roles ( )
inline

Definition at line 117 of file DBObjectPrivilegesTest.cpp.

117 { setup_roles(); }

◆ ~Roles()

virtual Roles::~Roles ( )
inlinevirtual

Definition at line 118 of file DBObjectPrivilegesTest.cpp.

118 { drop_roles(); }

Member Function Documentation

◆ drop_roles()

void Roles::drop_roles ( )
inline

Definition at line 103 of file DBObjectPrivilegesTest.cpp.

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

103  {
104  if (sys_cat.getRoleGrantee("OldLady")) {
105  sys_cat.dropRole("OldLady");
106  CHECK(!sys_cat.getRoleGrantee("OldLady"));
107  }
108  if (sys_cat.getRoleGrantee("Gunners")) {
109  sys_cat.dropRole("Gunners");
110  CHECK(!sys_cat.getRoleGrantee("Gunners"));
111  }
112  if (sys_cat.getRoleGrantee("Sudens")) {
113  sys_cat.dropRole("Sudens");
114  CHECK(!sys_cat.getRoleGrantee("sudens"));
115  }
116  }
#define CHECK(condition)
Definition: Logger.h:187

◆ setup_roles()

void Roles::setup_roles ( )
inline

Definition at line 88 of file DBObjectPrivilegesTest.cpp.

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

88  {
89  if (!sys_cat.getRoleGrantee("OldLady")) {
90  sys_cat.createRole("OldLady", false);
91  CHECK(sys_cat.getRoleGrantee("OldLady"));
92  }
93  if (!sys_cat.getRoleGrantee("Gunners")) {
94  sys_cat.createRole("Gunners", false);
95  CHECK(sys_cat.getRoleGrantee("Gunners"));
96  }
97  if (!sys_cat.getRoleGrantee("Sudens")) {
98  sys_cat.createRole("Sudens", false);
99  CHECK(sys_cat.getRoleGrantee("Sudens"));
100  }
101  }
#define CHECK(condition)
Definition: Logger.h:187

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