-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat: Support revoke command/grant command improvements for Clickhouse #229
Conversation
21d5325
to
e3cd938
Compare
: GRANT clusterClause? privilegeList ON grantSubjectIdentifier TO userOrRoleExpressionList (WITH GRANT OPTION)? (WITH REPLACE OPTION)? | ||
| GRANT clusterClause? roleIdentifier TO userOrRoleExpressionList (WITH ADMIN OPTION)? (WITH REPLACE OPTION)? | ||
: GRANT clusterClause? (privilegeList ON grantSubjectIdentifier) (COMMA privilegeList ON grantSubjectIdentifier)* TO userOrRoleExpressionList (WITH GRANT OPTION)? (WITH REPLACE OPTION)? | ||
| GRANT clusterClause? roleExpressionList TO userOrRoleExpressionList (WITH ADMIN OPTION)? (WITH REPLACE OPTION)? | ||
| GRANT CURRENT GRANTS ((LPAREN privilegeList ON grantSubjectIdentifier RPAREN) | ON grantSubjectIdentifier) TO userOrRoleExpressionList (WITH GRANT OPTION)? (WITH REPLACE OPTION)? | ||
; | ||
|
||
grantSubjectIdentifier |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Let's rename it to accessSubjectIdentifier
? It's being used in revoke
: GRANT clusterClause? privilegeList ON grantSubjectIdentifier TO userOrRoleExpressionList (WITH GRANT OPTION)? (WITH REPLACE OPTION)? | ||
| GRANT clusterClause? roleIdentifier TO userOrRoleExpressionList (WITH ADMIN OPTION)? (WITH REPLACE OPTION)? | ||
| GRANT CURRENT GRANTS ((LPAREN privilegeList ON grantSubjectIdentifier RPAREN) | ON grantSubjectIdentifier) TO userOrRoleExpressionList (WITH GRANT OPTION)? (WITH REPLACE OPTION)? | ||
: GRANT clusterClause? (privilegeList ON accessSubjectIdentifier) (COMMA privilegeList ON accessSubjectIdentifier)* TO userOrRoleExpressionList (WITH GRANT OPTION)? (WITH REPLACE OPTION)? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I think we can move out WITH REPLACE OPTION
, it is copy pasted multiple times
expect(autocompleteResult.errors).toHaveLength(0); | ||
}); | ||
|
||
test('should not report errors', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd give these tests different names, because if one of them fails it will be hard to understand which one
8e09e1f
to
5472325
Compare
No description provided.