Skip to content
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

Add authentication to the Preview Web UI #23230

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,13 @@ public AccessType getAccessType(ResourceInfo resourceInfo)
// check if the resource class has an access type declared for all methods
accessType = resourceAccessTypeLoader.getAccessType(resourceInfo.getResourceClass());
if (accessType.isPresent()) {
verifyNotTrinoResource(resourceInfo);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dain this prohibited @ResourceSecurity at the class level for io.trino Jax-RS resources. Was it on purpose?

return accessType.get();
}
// in some cases there the resource is a nested class, so check the parent class
// we currently only check one level, but we could handle multiple nesting levels if necessary
if (resourceInfo.getResourceClass().getDeclaringClass() != null) {
accessType = resourceAccessTypeLoader.getAccessType(resourceInfo.getResourceClass().getDeclaringClass());
if (accessType.isPresent()) {
verifyNotTrinoResource(resourceInfo);
return accessType.get();
}
}
Expand Down