mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-04 21:42:39 +00:00
62 lines
5.7 KiB
Plaintext
62 lines
5.7 KiB
Plaintext
--simple 1
|
||
GRANT SELECT ON *.* TO test_user_01074
|
||
REVOKE SELECT ON db.* FROM test_user_01074
|
||
--cleanup
|
||
--simple 2
|
||
GRANT SELECT ON db.* TO test_user_01074
|
||
REVOKE SELECT ON db.table FROM test_user_01074
|
||
--cleanup
|
||
--simple 3
|
||
GRANT SELECT ON db.table TO test_user_01074
|
||
REVOKE SELECT(col1) ON db.table FROM test_user_01074
|
||
--cleanup
|
||
--complex 1
|
||
GRANT SELECT ON *.* TO test_user_01074
|
||
REVOKE SELECT(col1, col2) ON db.table FROM test_user_01074
|
||
--cleanup
|
||
--complex 2
|
||
GRANT SELECT ON *.* TO test_user_01074
|
||
REVOKE SELECT ON db.* FROM test_user_01074
|
||
GRANT SELECT ON db.table TO test_user_01074
|
||
REVOKE SELECT(col1) ON db.table FROM test_user_01074
|
||
┏━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┓
|
||
┃ [1muser_name [0m ┃ [1mrole_name[0m ┃ [1maccess_type[0m ┃ [1mdatabase[0m ┃ [1mtable[0m ┃ [1mcolumn[0m ┃ [1mis_partial_revoke[0m ┃ [1mgrant_option[0m ┃
|
||
┡━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━┩
|
||
│ test_user_01074 │ ᴺᵁᴸᴸ │ SELECT │ ᴺᵁᴸᴸ │ ᴺᵁᴸᴸ │ ᴺᵁᴸᴸ │ 0 │ 0 │
|
||
├─────────────────┼───────────┼─────────────┼──────────┼───────┼────────┼───────────────────┼──────────────┤
|
||
│ test_user_01074 │ ᴺᵁᴸᴸ │ SELECT │ db │ ᴺᵁᴸᴸ │ ᴺᵁᴸᴸ │ 1 │ 0 │
|
||
├─────────────────┼───────────┼─────────────┼──────────┼───────┼────────┼───────────────────┼──────────────┤
|
||
│ test_user_01074 │ ᴺᵁᴸᴸ │ SELECT │ db │ table │ ᴺᵁᴸᴸ │ 0 │ 0 │
|
||
├─────────────────┼───────────┼─────────────┼──────────┼───────┼────────┼───────────────────┼──────────────┤
|
||
│ test_user_01074 │ ᴺᵁᴸᴸ │ SELECT │ db │ table │ col1 │ 1 │ 0 │
|
||
└─────────────────┴───────────┴─────────────┴──────────┴───────┴────────┴───────────────────┴──────────────┘
|
||
--cleanup
|
||
--revoke 1
|
||
GRANT SELECT ON *.* TO test_user_01074
|
||
REVOKE SELECT ON db.* FROM test_user_01074
|
||
--cleanup
|
||
--revoke 2
|
||
GRANT SELECT ON *.* TO test_user_01074
|
||
--cleanup
|
||
--grant option 1
|
||
GRANT SELECT ON *.* TO test_user_01074 WITH GRANT OPTION
|
||
REVOKE GRANT OPTION FOR SELECT(col1) ON db.table FROM test_user_01074
|
||
┏━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┓
|
||
┃ [1muser_name [0m ┃ [1mrole_name[0m ┃ [1maccess_type[0m ┃ [1mdatabase[0m ┃ [1mtable[0m ┃ [1mcolumn[0m ┃ [1mis_partial_revoke[0m ┃ [1mgrant_option[0m ┃
|
||
┡━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━┩
|
||
│ test_user_01074 │ ᴺᵁᴸᴸ │ SELECT │ ᴺᵁᴸᴸ │ ᴺᵁᴸᴸ │ ᴺᵁᴸᴸ │ 0 │ 1 │
|
||
├─────────────────┼───────────┼─────────────┼──────────┼───────┼────────┼───────────────────┼──────────────┤
|
||
│ test_user_01074 │ ᴺᵁᴸᴸ │ SELECT │ db │ table │ col1 │ 1 │ 1 │
|
||
└─────────────────┴───────────┴─────────────┴──────────┴───────┴────────┴───────────────────┴──────────────┘
|
||
--cleanup
|
||
--grant option 2
|
||
GRANT SELECT ON *.* TO test_user_01074 WITH GRANT OPTION
|
||
REVOKE SELECT(col1) ON db.table FROM test_user_01074
|
||
--cleanup
|
||
--grant option 3
|
||
GRANT SELECT ON *.* TO test_user_01074
|
||
--cleanup
|
||
--grant option 4
|
||
GRANT SELECT ON *.* TO test_user_01074
|
||
GRANT SELECT ON db.* TO test_user_01074 WITH GRANT OPTION
|