((().into(),Role::Owner),("NS","DB"),true,"owner at root level should be able to issue a grant"),
((().into(),Role::Editor),("NS","DB"),false,"editor at root level should not be able to issue a grant"),
((().into(),Role::Viewer),("NS","DB"),false,"viewer at root level should not be able to issue a grant"),
// Namespace level
((("NS",).into(),Role::Owner),("NS","DB"),true,"owner at namespace level should be able to issue a grant on its namespace"),
((("NS",).into(),Role::Owner),("OTHER_NS","DB"),false,"owner at namespace level should not be able to issue a grant on another namespace"),
((("NS",).into(),Role::Editor),("NS","DB"),false,"editor at namespace level should not be able to issue a grant on its namespace"),
((("NS",).into(),Role::Editor),("OTHER_NS","DB"),false,"editor at namespace level should not be able to issue a grant on another namespace"),
((("NS",).into(),Role::Viewer),("NS","DB"),false,"viewer at namespace level should not be able to issue a grant on its namespace"),
((("NS",).into(),Role::Viewer),("OTHER_NS","DB"),false,"viewer at namespace level should not be able to issue a grant on another namespace"),
// Database level
((("NS","DB").into(),Role::Owner),("NS","DB"),true,"owner at database level should be able to issue a grant on its database"),
((("NS","DB").into(),Role::Owner),("NS","OTHER_DB"),false,"owner at database level should not be able to issue a grant on another database"),
((("NS","DB").into(),Role::Owner),("OTHER_NS","DB"),false,"owner at database level should not be able to issue a grant on another namespace even if the database name matches"),
((("NS","DB").into(),Role::Editor),("NS","DB"),false,"editor at database level should not be able to issue a grant on its database"),
((("NS","DB").into(),Role::Editor),("NS","OTHER_DB"),false,"editor at database level should not be able to issue a grant on another database"),
((("NS","DB").into(),Role::Editor),("OTHER_NS","DB"),false,"editor at database level should not be able to issue a grant on another namespace even if the database name matches"),
((("NS","DB").into(),Role::Viewer),("NS","DB"),false,"viewer at database level should not be able to issue a grant on its database"),
((("NS","DB").into(),Role::Viewer),("NS","OTHER_DB"),false,"viewer at database level should not be able to issue a grant on another database"),
((("NS","DB").into(),Role::Viewer),("OTHER_NS","DB"),false,"viewer at database level should not be able to issue a grant on another namespace even if the database name matches"),
];
letstatement="ACCESS api ON DATABASE GRANT FOR USER tobie";
((().into(),Role::Owner),("NS","DB"),true,"owner at root level should be able to issue a grant"),
((().into(),Role::Editor),("NS","DB"),false,"editor at root level should not be able to issue a grant"),
((().into(),Role::Viewer),("NS","DB"),false,"viewer at root level should not be able to issue a grant"),
// Namespace level
((("NS",).into(),Role::Owner),("NS","DB"),true,"owner at namespace level should be able to issue a grant on its namespace"),
((("NS",).into(),Role::Owner),("OTHER_NS","DB"),false,"owner at namespace level should not be able to issue a grant on another namespace"),
((("NS",).into(),Role::Editor),("NS","DB"),false,"editor at namespace level should not be able to issue a grant on its namespace"),
((("NS",).into(),Role::Editor),("OTHER_NS","DB"),false,"editor at namespace level should not be able to issue a grant on another namespace"),
((("NS",).into(),Role::Viewer),("NS","DB"),false,"viewer at namespace level should not be able to issue a grant on its namespace"),
((("NS",).into(),Role::Viewer),("OTHER_NS","DB"),false,"viewer at namespace level should not be able to issue a grant on another namespace"),
// Database level
((("NS","DB").into(),Role::Owner),("NS","DB"),false,"owner at database level should not be able to issue a grant on its database"),
((("NS","DB").into(),Role::Owner),("NS","OTHER_DB"),false,"owner at database level should not be able to issue a grant on another database"),
((("NS","DB").into(),Role::Owner),("OTHER_NS","DB"),false,"owner at database level should not be able to issue a grant on another namespace even if the database name matches"),
((("NS","DB").into(),Role::Editor),("NS","DB"),false,"editor at database level should not be able to issue a grant on its database"),
((("NS","DB").into(),Role::Editor),("NS","OTHER_DB"),false,"editor at database level should not be able to issue a grant on another database"),
((("NS","DB").into(),Role::Editor),("OTHER_NS","DB"),false,"editor at database level should not be able to issue a grant on another namespace even if the database name matches"),
((("NS","DB").into(),Role::Viewer),("NS","DB"),false,"viewer at database level should not be able to issue a grant on its database"),
((("NS","DB").into(),Role::Viewer),("NS","OTHER_DB"),false,"viewer at database level should not be able to issue a grant on another database"),
((("NS","DB").into(),Role::Viewer),("OTHER_NS","DB"),false,"viewer at database level should not be able to issue a grant on another namespace even if the database name matches"),
];
letstatement="ACCESS api ON NAMESPACE GRANT FOR USER tobie";
((().into(),Role::Owner),("NS","DB"),true,"owner at root level should be able to issue a grant"),
((().into(),Role::Editor),("NS","DB"),false,"editor at root level should not be able to issue a grant"),
((().into(),Role::Viewer),("NS","DB"),false,"viewer at root level should not be able to issue a grant"),
// Namespace level
((("NS",).into(),Role::Owner),("NS","DB"),false,"owner at namespace level should not be able to issue a grant on its namespace"),
((("NS",).into(),Role::Owner),("OTHER_NS","DB"),false,"owner at namespace level should not be able to issue a grant on another namespace"),
((("NS",).into(),Role::Editor),("NS","DB"),false,"editor at namespace level should not be able to issue a grant on its namespace"),
((("NS",).into(),Role::Editor),("OTHER_NS","DB"),false,"editor at namespace level should not be able to issue a grant on another namespace"),
((("NS",).into(),Role::Viewer),("NS","DB"),false,"viewer at namespace level should not be able to issue a grant on its namespace"),
((("NS",).into(),Role::Viewer),("OTHER_NS","DB"),false,"viewer at namespace level should not be able to issue a grant on another namespace"),
// Database level
((("NS","DB").into(),Role::Owner),("NS","DB"),false,"owner at database level should not be able to issue a grant on its database"),
((("NS","DB").into(),Role::Owner),("NS","OTHER_DB"),false,"owner at database level should not be able to issue a grant on another database"),
((("NS","DB").into(),Role::Owner),("OTHER_NS","DB"),false,"owner at database level should not be able to issue a grant on another namespace even if the database name matches"),
((("NS","DB").into(),Role::Editor),("NS","DB"),false,"editor at database level should not be able to issue a grant on its database"),
((("NS","DB").into(),Role::Editor),("NS","OTHER_DB"),false,"editor at database level should not be able to issue a grant on another database"),
((("NS","DB").into(),Role::Editor),("OTHER_NS","DB"),false,"editor at database level should not be able to issue a grant on another namespace even if the database name matches"),
((("NS","DB").into(),Role::Viewer),("NS","DB"),false,"viewer at database level should not be able to issue a grant on its database"),
((("NS","DB").into(),Role::Viewer),("NS","OTHER_DB"),false,"viewer at database level should not be able to issue a grant on another database"),
((("NS","DB").into(),Role::Viewer),("OTHER_NS","DB"),false,"viewer at database level should not be able to issue a grant on another namespace even if the database name matches"),
];
letstatement="ACCESS api ON ROOT GRANT FOR USER tobie";