Skip to content

Commit 947d077

Browse files
committed
New privilege in test
1 parent 1e79f07 commit 947d077

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Access/tests/gtest_access_rights_ops.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ TEST(AccessRights, Union)
288288
"SYSTEM DROP REPLICA, SYSTEM SYNC REPLICA, SYSTEM RESTART REPLICA, "
289289
"SYSTEM RESTORE REPLICA, SYSTEM WAIT LOADING PARTS, SYSTEM SYNC DATABASE REPLICA, SYSTEM FLUSH DISTRIBUTED, "
290290
"SYSTEM LOAD PRIMARY KEY, SYSTEM UNLOAD PRIMARY KEY, dictGet ON db1.*, GRANT TABLE ENGINE ON db1, "
291-
"GRANT CREATE USER, ALTER USER, DROP USER, CREATE ROLE, ALTER ROLE, DROP ROLE, SET DEFINER ON db1, "
291+
"GRANT CREATE USER, ALTER USER, DROP USER, CREATE ROLE, ALTER ROLE, DROP ROLE, IMPERSONATE, SET DEFINER ON db1, "
292292
"GRANT NAMED COLLECTION ADMIN ON db1");
293293

294294
lhs = {};

src/Interpreters/Context.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1674,9 +1674,9 @@ void Context::setCurrentRolesDefault()
16741674
setCurrentRolesImpl(user->granted_roles.findGranted(user->default_roles), /* throw_if_not_granted= */ false, /* skip_if_not_granted= */ false, user);
16751675
}
16761676

1677-
void Context::switchImpersonateUser(const RolesOrUsersSet & users)
1677+
void Context::switchImpersonateUser(const RolesOrUsersSet & new_user)
16781678
{
1679-
auto new_user_uuid = *(users.ids.begin());
1679+
auto new_user_uuid = *(new_user.ids.begin());
16801680
setUser(new_user_uuid);
16811681
setCurrentUserName(getUser()->getName());
16821682
setInitialUserName(getUser()->getName()); /// ensure to update the client_info

0 commit comments

Comments
 (0)