Add checkCanGrantExecuteFunctionPrivilege to ConnectorAccessControl#14191
Conversation
|
I would like to add a test for that, but not sure where should I start. |
ksobolew
left a comment
There was a problem hiding this comment.
Makes sense, but I wonder... How much are we going to phase out connector access control in favor of global access control? (I know, this is a bigger question :) )
core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorAccessControl.java
Outdated
Show resolved
Hide resolved
kokosing
left a comment
There was a problem hiding this comment.
You can write a test against sql-standard access control, to see it is rejecting table functions by default.
There was a problem hiding this comment.
I am under impression that this throw is not needed. However, it leaves no question that is a dead code.
Or maybe you can use return switch here?
There was a problem hiding this comment.
I wanted to say the same, but the return value is void so it won't work.
|
lgtm % let's have a test |
plugin/trino-hive/src/main/java/io/trino/plugin/hive/security/SqlStandardAccessControl.java
Outdated
Show resolved
Hide resolved
|
You can use |
8035179 to
03bc954
Compare
|
LGTM % test |
03bc954 to
9838b12
Compare
|
I rebased and add few tests in |
|
Maven checks are failiing |
There was a problem hiding this comment.
May be { not needed?
What about testing checkCanExecuteFunction?
There was a problem hiding this comment.
May be { not needed?
execute is overloaded and in-lining cause compilation error
What about testing checkCanExecuteFunction?
This is already checked in other tests
There was a problem hiding this comment.
could you please verify that you have access before setting DenyConnectorAccessControl?
There was a problem hiding this comment.
This is checked in testAllowExecuteTableFunction test
There was a problem hiding this comment.
Yeah, I'd prefer to have these tests duplicated, than not to have it here.
It would underline that just before setting DenyConnectorAccessControl it was possible to select from that connector. Actually that's @kokosing's style.
9838b12 to
befc8b4
Compare
|
Merged, thanks! |
Description
Follow-up to #13944
I will needed this to complete #13713
Release notes
( ) This is not user-visible and no release notes are required.
( ) Release notes are required, please propose a release note for me.
(x) Release notes are required, with the following suggested text: