mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-09-25 06:58:39 +00:00
bug5510: Introduced new PrototypeRole StreamletViewerRole
This commit is contained in:
+2
-1
@@ -53,7 +53,8 @@ public class SecuredDomainType extends HasPermissionsImpl {
|
||||
public static enum TrackedRaceActions implements Action {
|
||||
CAN_REPLAY_DURING_LIVE_RACES,
|
||||
DETAIL_TIMER,
|
||||
EXPORT;
|
||||
EXPORT,
|
||||
VIEWSTREAMLETS;
|
||||
|
||||
private static final Action[] ALL_ACTIONS = DefaultActions.plus(CAN_REPLAY_DURING_LIVE_RACES, DETAIL_TIMER,
|
||||
EXPORT);
|
||||
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
package com.sap.sailing.server.security;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import com.sap.sailing.domain.common.security.SecuredDomainType;
|
||||
import com.sap.sse.security.shared.RolePrototype;
|
||||
import com.sap.sse.security.shared.WildcardPermission;
|
||||
|
||||
/**
|
||||
* Specifies a role that when associated to a user gives access to the streamlet Feature on the RaceMap
|
||||
*/
|
||||
public class StreamletViewerRole extends RolePrototype {
|
||||
protected static final UUID ROLE_ID = UUID.fromString("f7912343-2091-4925-b815-8f68a4414eff");
|
||||
|
||||
private static final long serialVersionUID = 3291793984984443193L;
|
||||
|
||||
private static final StreamletViewerRole INSTANCE = new StreamletViewerRole();
|
||||
|
||||
StreamletViewerRole() {
|
||||
super("streamlet_viewer", ROLE_ID.toString(),
|
||||
WildcardPermission.builder().withTypes(SecuredDomainType.TRACKED_RACE)
|
||||
.withActions(SecuredDomainType.TrackedRaceActions.VIEWSTREAMLETS).build());
|
||||
}
|
||||
|
||||
public static StreamletViewerRole getInstance() {
|
||||
return INSTANCE;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user