mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-09-22 21:55:39 +00:00
bug6007: implemented logging for event and regatta creation
This commit is contained in:
+1
@@ -608,6 +608,7 @@ public class EventsResource extends AbstractSailingServerResource {
|
||||
Callable<Util.Triple<Event, LeaderboardGroup, RegattaLeaderboard>> doCreationAction = new Callable<Util.Triple<Event, LeaderboardGroup, RegattaLeaderboard>>() {
|
||||
@Override
|
||||
public Util.Triple<Event, LeaderboardGroup, RegattaLeaderboard> call() throws Exception {
|
||||
logger.info("User "+SecurityUtils.getSubject().getPrincipal()+" is trying to create event "+eventName);
|
||||
Event event = getSecurityService().setOwnershipCheckPermissionForObjectCreationAndRevertOnError(
|
||||
SecuredDomainType.EVENT, EventBaseImpl.getTypeRelativeObjectIdentifier(eventId),
|
||||
eventName, ()->getService().apply(new CreateEvent(eventName, eventDescription, startDate, endDate, venueName, isPublic, eventId,
|
||||
|
||||
+2
@@ -27,6 +27,7 @@ import java.util.stream.Collectors;
|
||||
import java.util.stream.StreamSupport;
|
||||
|
||||
import org.apache.commons.fileupload.FileItem;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.apache.shiro.authz.AuthorizationException;
|
||||
import org.apache.shiro.subject.Subject;
|
||||
import org.json.simple.parser.ParseException;
|
||||
@@ -329,6 +330,7 @@ public class ExpeditionAllInOneImporter {
|
||||
final TimePointsOfFirstAndLastFix firstAndLastFixAt = importFixes(filenameWithSuffix, fileItem, jsonHolderForGpsFixImport, jsonHolderForSensorFixImport, errors);
|
||||
final TimePoint eventStartDate = firstAndLastFixAt.getFirstFixAt();
|
||||
final TimePoint eventEndDate = firstAndLastFixAt.getLastFixAt();
|
||||
logger.info("Trying to create event "+eventName+" and regatta "+regattaName+" on behalf of user "+SecurityUtils.getSubject().getPrincipal());
|
||||
final Iterable<Triple<DynamicTrackedRace, String, String>> trackedRacesAndRaceColumnNamesAndFleetNames =
|
||||
createEventStructureWithASingleRaceAndTrackIt(
|
||||
filenameWithSuffix, boatClassName, errors, importTimeString, filename,
|
||||
|
||||
Reference in New Issue
Block a user