Added ExperimentalFeatures flag to enable/disable User Management menu

in RaceBoard
This commit is contained in:
Benjamin Barth committed 2016-02-01 11:56:46 +01:00
1 parent 92712cff89
commit 7869c51219
2 files changed
+16

No files matched your search

@@ -0,0 +1,12 @@
package com.sap.sailing.gwt.ui.raceboard;
/**
* This class contains convenience boolean flags to enable/ disable features in experimental phase.
*/
public class ExperimentalFeatures {
/**
* Enables/disables user management on race board by showing/hiding the respective menu in the upper right corner.
*/
public static final boolean SHOW_USER_MANAGEMENT_ON_RACEBOARD = true;
}
@@ -309,6 +309,10 @@ public class RaceBoardPanel extends SimplePanel implements LeaderboardUpdateList
AuthenticationCallback callback = new AuthenticationCallbackImpl(userManagementController);
userManagementController = new AuthenticationPlaceManagementController(clientFactory, callback, display, eventBus);
new FlyoutAuthenticationPresenter(display, userManagementMenuView, userManagementController, eventBus);
if (!ExperimentalFeatures.SHOW_USER_MANAGEMENT_ON_RACEBOARD) {
regattaAndRaceTimeInformationHeader.getElement().getStyle().setRight(10, Unit.PX);
userManagementMenuView.asWidget().removeFromParent();
}
}
@SuppressWarnings("unused")