Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] the role's privileges can't not be revoked correctly. #2068

Open
h4ofanya opened this issue Apr 15, 2024 · 0 comments
Open

[BUG] the role's privileges can't not be revoked correctly. #2068

h4ofanya opened this issue Apr 15, 2024 · 0 comments
Assignees

Comments

@h4ofanya
Copy link
Collaborator

Describe the bug

When you want to revoke a role's read privilege, you find that you can't succeed

To Reproduce

use root

public ❯ create role test_role;
Query took 0.027 seconds.
public ❯ create user test_user;
Query took 0.016 seconds.
public ❯ alter tenant cnosdb add user test_user as test_role;
Query took 0.015 seconds.
public ❯ create database d001;
Query took 0.015 seconds.
public ❯ revoke all on database d001 from test_role;
Query took 0.013 seconds.
public ❯ revoke write on database d001 from test_role;
Query took 0.012 seconds.
public ❯ revoke read on database d001 from test_role;
Query took 0.013 seconds.
public ❯ \c d001
d001 ❯ create table air(d1 double);

then use test_user

public ❯ \c d001
d001 ❯ show tables;
+------------+
| table_name |
+------------+
| air        |
+------------+
Query took 0.024 seconds.
d001 ❯ select * from air;
Query took 0.015 seconds.
d001 ❯ create table aa(d1 double);
422 Unprocessable Entity, details: {"error_code":"010004","error_message":"Insufficient privileges, expected [Full on database d001 of tenant 78322384368497284380257291774744000001]"}

Expected behavior

No response

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants