Skip to content

Commit

Permalink
1. fix
Browse files Browse the repository at this point in the history
2. add tasks and task_history to SYSTEM_TABLES_ALLOW_LIST

3. delete useless test
  • Loading branch information
TCeason committed May 14, 2024
1 parent 350dd50 commit ce002e9
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/query/ast/src/parser/statement.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2831,7 +2831,7 @@ pub fn priv_type(i: Input) -> IResult<UserPrivilegeType> {
UserPrivilegeType::CreateDatabase,
rule! { CREATE ~ DATABASE },
),
value(UserPrivilegeType::CreateDatabase, rule! { CREATE ~ TASK }),
value(UserPrivilegeType::CreateTask, rule! { CREATE ~ TASK }),
value(UserPrivilegeType::DropUser, rule! { DROP ~ USER }),
value(UserPrivilegeType::CreateRole, rule! { CREATE ~ ROLE }),
value(UserPrivilegeType::DropRole, rule! { DROP ~ ROLE }),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ enum ObjectId {
// some statements like `SELECT 1`, `SHOW USERS`, `SHOW ROLES`, `SHOW TABLES` will be
// rewritten to the queries on the system tables, we need to skip the privilege check on
// these tables.
const SYSTEM_TABLES_ALLOW_LIST: [&str; 18] = [
const SYSTEM_TABLES_ALLOW_LIST: [&str; 20] = [
"catalogs",
"columns",
"databases",
Expand All @@ -73,6 +73,8 @@ const SYSTEM_TABLES_ALLOW_LIST: [&str; 18] = [
"processes",
"user_functions",
"functions",
"tasks",
"task_history",
];

impl PrivilegeAccess {
Expand Down
Empty file.
8 changes: 0 additions & 8 deletions tests/suites/0_stateless/18_rbac/18_0011_task.sh

This file was deleted.

0 comments on commit ce002e9

Please sign in to comment.