Skip to content

Commit a628997

Browse files
committed
fix conversation
1 parent 606adb4 commit a628997

File tree

4 files changed

+24
-26
lines changed

4 files changed

+24
-26
lines changed

src/meta/proto-conv/tests/it/v137_add_grant_object_connection.rs

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ use crate::common;
3636
//
3737

3838
#[test]
39+
<<<<<<< HEAD:src/meta/proto-conv/tests/it/v137_add_grant_object_connection.rs
3940
fn test_decode_v137_grant_object() -> anyhow::Result<()> {
4041
let role_info_v137 = vec![
4142
10, 2, 114, 49, 18, 214, 1, 10, 23, 10, 9, 10, 0, 160, 6, 137, 1, 168, 6, 24, 16, 128, 128,
@@ -51,6 +52,17 @@ fn test_decode_v137_grant_object() -> anyhow::Result<()> {
5152
49, 57, 55, 48, 45, 48, 49, 45, 48, 49, 32, 48, 48, 58, 48, 48, 58, 48, 48, 32, 85, 84, 67,
5253
34, 23, 49, 57, 55, 48, 45, 48, 49, 45, 48, 49, 32, 48, 48, 58, 48, 48, 58, 48, 48, 32, 85,
5354
84, 67, 160, 6, 137, 1, 168, 6, 24,
55+
=======
56+
fn test_decode_v136_grant_connection_object() -> anyhow::Result<()> {
57+
let role_info_v136 = vec![
58+
10, 2, 114, 49, 18, 86, 10, 23, 10, 9, 10, 0, 160, 6, 136, 1, 168, 6, 24, 16, 128, 128,
59+
128, 2, 160, 6, 136, 1, 168, 6, 24, 10, 27, 10, 13, 74, 4, 10, 2, 99, 49, 160, 6, 136, 1,
60+
168, 6, 24, 16, 128, 128, 128, 4, 160, 6, 136, 1, 168, 6, 24, 10, 23, 10, 9, 10, 0, 160, 6,
61+
136, 1, 168, 6, 24, 16, 254, 255, 191, 7, 160, 6, 136, 1, 168, 6, 24, 160, 6, 136, 1, 168,
62+
6, 24, 26, 23, 49, 57, 55, 48, 45, 48, 49, 45, 48, 49, 32, 48, 48, 58, 48, 48, 58, 48, 48,
63+
32, 85, 84, 67, 34, 23, 49, 57, 55, 48, 45, 48, 49, 45, 48, 49, 32, 48, 48, 58, 48, 48, 58,
64+
48, 48, 32, 85, 84, 67, 160, 6, 136, 1, 168, 6, 24,
65+
>>>>>>> ffc4e86d5b (fix conversation):src/meta/proto-conv/tests/it/v136_add_grant_object_connection.rs
5466
];
5567
let want = || mt::principal::RoleInfo {
5668
name: "r1".to_string(),
@@ -64,26 +76,6 @@ fn test_decode_v137_grant_object() -> anyhow::Result<()> {
6476
mt::principal::GrantObject::Connection("c1".to_string()),
6577
make_bitflags!(UserPrivilegeType::{AccessConnection}),
6678
),
67-
mt::principal::GrantEntry::new(
68-
mt::principal::GrantObject::Database("default".to_string(), "db".to_string()),
69-
make_bitflags!(UserPrivilegeType::{Create}),
70-
),
71-
mt::principal::GrantEntry::new(
72-
mt::principal::GrantObject::Table(
73-
"default".to_string(),
74-
"db".to_string(),
75-
"tb".to_string(),
76-
),
77-
make_bitflags!(UserPrivilegeType::{Create}),
78-
),
79-
mt::principal::GrantEntry::new(
80-
mt::principal::GrantObject::UDF("f1".to_string()),
81-
make_bitflags!(UserPrivilegeType::{Usage}),
82-
),
83-
mt::principal::GrantEntry::new(
84-
mt::principal::GrantObject::Stage("s1".to_string()),
85-
make_bitflags!(UserPrivilegeType::{Write}),
86-
),
8779
// test new global privilege CreateConneciton, AccessConnection
8880
mt::principal::GrantEntry::new(
8981
mt::principal::GrantObject::Global,
@@ -103,9 +95,15 @@ fn test_decode_v137_grant_object() -> anyhow::Result<()> {
10395
}
10496

10597
#[test]
98+
<<<<<<< HEAD:src/meta/proto-conv/tests/it/v137_add_grant_object_connection.rs
10699
fn test_decode_v137_ownership() -> anyhow::Result<()> {
107100
let ownership_info_v137 = vec![
108101
10, 2, 114, 49, 18, 13, 50, 4, 10, 2, 99, 49, 160, 6, 137, 1, 168, 6, 24, 160, 6, 137, 1,
102+
=======
103+
fn test_decode_v136_connection_ownership() -> anyhow::Result<()> {
104+
let ownership_info_v136 = vec![
105+
10, 2, 114, 49, 18, 13, 50, 4, 10, 2, 99, 49, 160, 6, 136, 1, 168, 6, 24, 160, 6, 136, 1,
106+
>>>>>>> ffc4e86d5b (fix conversation):src/meta/proto-conv/tests/it/v136_add_grant_object_connection.rs
109107
168, 6, 24,
110108
];
111109

src/meta/protos/proto/ownership.proto

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ message OwnershipObject {
5050
string id = 1;
5151
}
5252

53-
message OwnershipConnectionObject {
54-
string connection = 1;
55-
}
53+
message OwnershipConnectionObject {
54+
string connection = 1;
55+
}
5656

5757
oneof object {
5858
OwnershipDatabaseObject database = 1;

src/meta/protos/proto/user.proto

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ message GrantObject {
8282
}
8383

8484
message GrantConnectionObject {
85-
string connection = 1;
86-
}
85+
string connection = 1;
86+
}
8787

8888
oneof object {
8989
GrantGlobalObject global = 1;

src/query/service/src/interpreters/access/privilege_access.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ impl PrivilegeAccess {
297297

298298
return Err(ErrorCode::PermissionDenied(format!(
299299
"Permission denied: privilege [{:?}] is required on '{}'.'{}'.* for user {} with roles [{}]. \
300-
Note: Please ensure that your current role have the appropriate permissions to create a new Warehouse|Database|Table|UDF|Stage.",
300+
Note: Please ensure that your current role have the appropriate permissions to create a new Warehouse|Database|Table|UDF|Stage|Connection",
301301
privileges,
302302
catalog_name,
303303
db_name,

0 commit comments

Comments
 (0)