Labels defined with colon

This commit is contained in:
niko4299 2022-07-07 13:15:01 +02:00
parent 4366085d89
commit 1abe8f8bfc
3 changed files with 7 additions and 6 deletions

View File

@ -501,7 +501,7 @@ class AuthQueryHandler final : public memgraph::query::AuthQueryHandler {
if (first_user) {
spdlog::info("{} is first created user. Granting all privileges.", username);
GrantPrivilege(username, memgraph::query::kPrivilegesAll, {});
GrantPrivilege(username, memgraph::query::kPrivilegesAll, {"*"});
}
return user_added;

View File

@ -260,7 +260,7 @@ privilege : CREATE
privilegeList : privilege ( ',' privilege )* ;
labelList : label ( ',' label )* ;
labelList : COLON label ( ',' COLON label )* ;
label : ( '*' | symbolicName ) ;

View File

@ -295,10 +295,11 @@ Callback HandleAuthQuery(AuthQuery *auth_query, AuthQueryHandler *auth, const Pa
AuthQuery::Action::REVOKE_PRIVILEGE, AuthQuery::Action::SHOW_PRIVILEGES, AuthQuery::Action::SHOW_USERS_FOR_ROLE,
AuthQuery::Action::SHOW_ROLE_FOR_USER};
if (license_check_result.HasError() && enterprise_only_methods.contains(auth_query->action_)) {
throw utils::BasicException(
utils::license::LicenseCheckErrorToString(license_check_result.GetError(), "advanced authentication features"));
}
// if (license_check_result.HasError() && enterprise_only_methods.contains(auth_query->action_)) {
// throw utils::BasicException(
// utils::license::LicenseCheckErrorToString(license_check_result.GetError(), "advanced authentication
// features"));
// }
switch (auth_query->action_) {
case AuthQuery::Action::CREATE_USER: