Commit 513ae974 authored by Dmitriy Novikov's avatar Dmitriy Novikov
Browse files

Fixed AuditLogger user email usage

parent 90efd92a
package org.opengroup.osdu.indexer.di;
import java.util.List;
import java.util.Optional;
import javax.inject.Inject;
import org.opengroup.osdu.core.common.logging.audit.AuditPayload;
import org.opengroup.osdu.core.common.model.http.DpsHeaders;
......@@ -27,7 +28,9 @@ public class AuditLogger {
private AuditEvents getAuditEvents() {
if (this.events == null) {
this.events = new AuditEvents(this.headers.getUserEmail());
String user = Optional.ofNullable(this.headers.getUserEmail())
.orElse("storage-user-email");
this.events = new AuditEvents(user);
}
return this.events;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment