-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Implement missing methods in forwarding class #10087
Conversation
@@ -137,6 +137,7 @@ default void checkCanViewQueryOwnedBy(SystemSecurityContext context, Identity qu | |||
* will not be called when the current user is the query owner. | |||
* | |||
* @throws AccessDeniedException if not allowed | |||
* @deprecated Implement {@link #checkCanViewQueryOwnedBy(SystemSecurityContext, Identity)} instead. | |||
*/ |
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.
Add @Deprecated
annotation. Or should we remove it everywhere?
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.
yes, both should be present
core/trino-spi/src/main/java/io/trino/spi/security/SystemAccessControl.java
Show resolved
Hide resolved
bcfb44e
to
71c5f3d
Compare
@@ -137,7 +137,9 @@ default void checkCanViewQueryOwnedBy(SystemSecurityContext context, Identity qu | |||
* will not be called when the current user is the query owner. | |||
* | |||
* @throws AccessDeniedException if not allowed | |||
* @deprecated Implement {@link #checkCanViewQueryOwnedBy(SystemSecurityContext, Identity)} instead. |
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 there are three of them. To filter and to kill query too.
Typically we have never deprecated anything in access control interfaces. There are so many methods here and we start dealing with deprecation it will get messy IMO. I think I would simply drop deprecated methods.
We use deprecation once for checkCanSetUser
. But there semantic was changing, here we only change the parameter.
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.
if we plan to drop, we should try to deprecate first, if possible. Here it seems possible.
CI #8611 |
59825d6
to
e8dd6a2
Compare
(just rebased) |
`filterViewQuery` was introduced as a better version of `filterViewQueryOwnedBy`, so they should be overloads of each other, if possible.
It was superseded by a version taking identities in f7aac0d.
No description provided.