mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-11-15 14:56:41 +00:00
Bug 4816 made SecuredDomainType.CAN_REPLAY_DURING_LIVE_RACES an action
of SecuredDomainType.TRACKED_RACE
This commit is contained in:
1 parent
d7a3fc2f23
commit
69959045e2
5 files changed
+22
-9
No files matched your search
+13
-2
@@ -36,7 +36,6 @@ public class SecuredDomainType extends HasPermissionsImpl {
|
||||
// AdminConsole permissions
|
||||
public static final HasPermissions MANAGE_MARK_PASSINGS = new SecuredDomainType("MANAGE_MARK_PASSINGS");
|
||||
public static final HasPermissions MANAGE_MARK_POSITIONS = new SecuredDomainType("MANAGE_MARK_POSITIONS");
|
||||
public static final HasPermissions CAN_REPLAY_DURING_LIVE_RACES = new SecuredDomainType("CAN_REPLAY_DURING_LIVE_RACES");
|
||||
public static final HasPermissions DETAIL_TIMER = new SecuredDomainType("DETAIL_TIMER"); // TODO this is not a valid "HasPermission" instance; it's more an operation the user may be granted on objects of the TimePanel type
|
||||
|
||||
public static final HasPermissions EVENT = new SecuredDomainType("EVENT");
|
||||
@@ -47,8 +46,20 @@ public class SecuredDomainType extends HasPermissionsImpl {
|
||||
|
||||
public static final HasPermissions LEADERBOARD_GROUP = new SecuredDomainType("LEADERBOARD_GROUP");
|
||||
|
||||
public static final HasPermissions TRACKED_RACE = new SecuredDomainType("TRACKED_RACE");
|
||||
public static final HasPermissions TRACKED_RACE = new SecuredDomainType("TRACKED_RACE",
|
||||
TrackedRaceActions.ALL_ACTIONS);
|
||||
|
||||
public static enum TrackedRaceActions implements Action {
|
||||
CAN_REPLAY_DURING_LIVE_RACES;
|
||||
|
||||
private static final Action[] ALL_ACTIONS = new Action[] { CAN_REPLAY_DURING_LIVE_RACES, DefaultActions.READ,
|
||||
DefaultActions.CREATE, DefaultActions.UPDATE, DefaultActions.CHANGE_OWNERSHIP,
|
||||
DefaultActions.CHANGE_ACL };
|
||||
|
||||
public static final Action[] MUTATION_ACTIONS = new Action[] { DefaultActions.CREATE, DefaultActions.UPDATE,
|
||||
DefaultActions.CHANGE_OWNERSHIP, DefaultActions.CHANGE_ACL };
|
||||
}
|
||||
|
||||
public static enum CompetitorAndBoatActions implements Action {
|
||||
READ_PUBLIC;
|
||||
|
||||
|
||||
+2
-1
@@ -192,7 +192,8 @@ public class AdminConsoleEntryPoint extends AbstractSailingEntryPoint
|
||||
public void refreshAfterBecomingVisible() {
|
||||
fillRegattas();
|
||||
}
|
||||
}, getStringMessages().trackedRaces(), SecuredDomainType.TRACKED_RACE.getPermission(DefaultActions.MUTATION_ACTIONS));
|
||||
}, getStringMessages().trackedRaces(),
|
||||
SecuredDomainType.TRACKED_RACE.getPermission(SecuredDomainType.TrackedRaceActions.MUTATION_ACTIONS));
|
||||
regattasDisplayers.add(trackedRacesManagementPanel);
|
||||
|
||||
final CompetitorPanel competitorPanel = new CompetitorPanel(getSailingService(), getUserService(), getStringMessages(), this);
|
||||
|
||||
+3
-1
@@ -60,7 +60,9 @@ public class RaceTimePanel extends TimePanel<RaceTimePanelSettings> implements R
|
||||
@Override
|
||||
public void onUserStatusChange(UserDTO user, boolean preAuthenticated) {
|
||||
RaceTimePanel.this.hasCanReplayDuringLiveRacesPermission = userService.hasPermission(
|
||||
SecuredDomainType.CAN_REPLAY_DURING_LIVE_RACES.getPermission(), /* TODO race ownership */ null, /* TODO race acl */ null);
|
||||
selectedRace.getIdentifier()
|
||||
.getPermission(SecuredDomainType.TrackedRaceActions.CAN_REPLAY_DURING_LIVE_RACES),
|
||||
/* TODO race ownership */ null, /* TODO race acl */ null);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
+2
-2
@@ -98,8 +98,8 @@ public class ManeuverTablePanel extends AbstractCompositeComponent<ManeuverTable
|
||||
final UserStatusEventHandler userStatusChangeHandler = new UserStatusEventHandler() {
|
||||
@Override
|
||||
public void onUserStatusChange(UserDTO user, boolean preAuthenticated) {
|
||||
hasCanReplayDuringLiveRacesPermission = userService
|
||||
.hasPermission(SecuredDomainType.CAN_REPLAY_DURING_LIVE_RACES.getStringPermission());
|
||||
hasCanReplayDuringLiveRacesPermission = userService.hasPermission(raceIdentifier.getIdentifier()
|
||||
.getPermission(SecuredDomainType.TrackedRaceActions.CAN_REPLAY_DURING_LIVE_RACES));
|
||||
}
|
||||
};
|
||||
userService.addUserStatusEventHandler(userStatusChangeHandler);
|
||||
|
||||
+2
-3
@@ -293,14 +293,14 @@ import com.sap.sse.replication.OperationExecutionListener;
|
||||
import com.sap.sse.replication.OperationWithResult;
|
||||
import com.sap.sse.replication.OperationWithResultWithIdWrapper;
|
||||
import com.sap.sse.replication.OperationsToMasterSender;
|
||||
import com.sap.sse.replication.OperationsToMasterSendingQueue;
|
||||
import com.sap.sse.replication.ReplicationMasterDescriptor;
|
||||
import com.sap.sse.replication.ReplicationService;
|
||||
import com.sap.sse.security.SecurityService;
|
||||
import com.sap.sse.security.shared.RoleDefinition;
|
||||
import com.sap.sse.security.shared.impl.Role;
|
||||
import com.sap.sse.security.shared.impl.User;
|
||||
import com.sap.sse.security.shared.impl.UserGroup;
|
||||
import com.sap.sse.replication.ReplicationService;
|
||||
import com.sap.sse.replication.OperationsToMasterSendingQueue;
|
||||
import com.sap.sse.shared.media.ImageDescriptor;
|
||||
import com.sap.sse.shared.media.VideoDescriptor;
|
||||
import com.sap.sse.util.ClearStateTestSupport;
|
||||
@@ -991,7 +991,6 @@ public class RacingEventServiceImpl implements RacingEventService, ClearStateTes
|
||||
securityService.assumeOwnershipMigrated(SecuredDomainType.RACE_MANAGER_APP_DEVICE_CONFIGURATION.getName());
|
||||
securityService.assumeOwnershipMigrated(SecuredDomainType.RESULT_IMPORT_URL.getName());
|
||||
securityService.assumeOwnershipMigrated(SecuredDomainType.MANAGE_MARK_POSITIONS.getName());
|
||||
securityService.assumeOwnershipMigrated(SecuredDomainType.CAN_REPLAY_DURING_LIVE_RACES.getName());
|
||||
securityService.assumeOwnershipMigrated(SecuredDomainType.DETAIL_TIMER.getName());
|
||||
securityService.assumeOwnershipMigrated(SecuredDomainType.DATA_MINING.getName());
|
||||
securityService.assumeOwnershipMigrated(SecuredDomainType.REPLICATOR.getName());
|
||||
|
||||
Reference in new issue
Block a user