• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

IQSS / dataverse / #23072

04 Sep 2024 02:25PM CUT coverage: 20.759% (-0.001%) from 20.76%
#23072

push

github

web-flow
Fix addDataverse expected request body structure (#10802)

* Fixed: MetadataBlockServiceBean to check for not excluded fields in input levels

* Changed: using queries for obtaining dataset field types based on displaying conditions

* Refactor: json printer method for MetadataBlock

* Added: IT test case for list metadata blocks testing field with include=false and displayOnCreate=true property

* Fixed: removed condition in MetadataBlockServiceBean

* Added: release notes for #10741

* Fixed: displayOnCreate query logic

* Fixed: excluding conditionally required fields when display-on-create is true

* Fixed: query predicate for required-in-dataverse field condition

* Fixed: addDataverse API facetIds field json structure

* Added: docs #10800

0 of 3 new or added lines in 1 file covered. (0.0%)

1 existing line in 1 file now uncovered.

17527 of 84429 relevant lines covered (20.76%)

0.21 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/main/java/edu/harvard/iq/dataverse/api/auth/AuthFilter.java
1
package edu.harvard.iq.dataverse.api.auth;
2

3
import edu.harvard.iq.dataverse.api.ApiConstants;
4
import edu.harvard.iq.dataverse.authorization.users.User;
5

6
import jakarta.annotation.Priority;
7
import jakarta.inject.Inject;
8
import jakarta.ws.rs.Priorities;
9
import jakarta.ws.rs.container.ContainerRequestContext;
10
import jakarta.ws.rs.container.ContainerRequestFilter;
11
import jakarta.ws.rs.ext.Provider;
12
import java.io.IOException;
13

14
/**
15
 * @author Guillermo Portas
16
 * Dedicated filter to authenticate the user requesting an API endpoint that requires user authentication.
17
 */
18
@AuthRequired
19
@Provider
20
@Priority(Priorities.AUTHENTICATION)
21
public class AuthFilter implements ContainerRequestFilter {
×
22

23
    @Inject
24
    private CompoundAuthMechanism compoundAuthMechanism;
25

26
    @Override
27
    public void filter(ContainerRequestContext containerRequestContext) throws IOException {
28
        try {
29
            User user = compoundAuthMechanism.findUserFromRequest(containerRequestContext);
×
30
            containerRequestContext.setProperty(ApiConstants.CONTAINER_REQUEST_CONTEXT_USER, user);
×
31
        } catch (WrappedAuthErrorResponse e) {
×
32
            containerRequestContext.abortWith(e.getResponse());
×
33
        }
×
34
    }
×
35
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc