Remove authorizer for the collect endpoint (#8398)

This commit is contained in:
Teddy 2022-10-28 12:45:55 +02:00 committed by GitHub
parent c74d5a9b18
commit f027c26cc1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 6 deletions

View File

@ -6,7 +6,6 @@ import java.io.IOException;
import java.util.List;
import java.util.UUID;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.UriInfo;
import org.jdbi.v3.sqlobject.transaction.Transaction;
import org.openmetadata.schema.EntityInterface;
import org.openmetadata.schema.analytics.WebAnalyticEvent;
@ -74,10 +73,8 @@ public class WebAnalyticEventRepository extends EntityRepository<WebAnalyticEven
}
@Transaction
public Response addWebAnalyticEventData(UriInfo uriInfo, WebAnalyticEventData webAnalyticEventData)
throws IOException {
public Response addWebAnalyticEventData(WebAnalyticEventData webAnalyticEventData) throws IOException {
webAnalyticEventData.setEventId(UUID.randomUUID());
WebAnalyticEvent webAnalyticEvent = dao.findEntityByName(webAnalyticEventData.getEventType().value());
daoCollection
.entityExtensionTimeSeriesDao()
.insert(

View File

@ -384,8 +384,7 @@ public class WebAnalyticEventResource extends EntityResource<WebAnalyticEvent, W
@Context SecurityContext securityContext,
@Valid WebAnalyticEventData webAnalyticEventData)
throws IOException {
authorizer.authorizeAdmin(securityContext);
return dao.addWebAnalyticEventData(uriInfo, webAnalyticEventData);
return dao.addWebAnalyticEventData(webAnalyticEventData);
}
@GET