Package com.atlassian.bamboo
Interface DarkFeatureService
-
- All Known Implementing Classes:
DefaultDarkFeatureService
@Internal public interface DarkFeatureServiceAn interface that indicates which features are on or off. These can come from system properties or configurable Dark Features.- Since:
- 5.9
-
-
Field Summary
Fields Modifier and Type Field Description static StringCREATE_DEPLOYMENT_GRANTED_BY_PROJECTstatic StringRSS_CREATE_RESULT_IF_NO_CHANGESstatic StringSOX_COMPLIANCE_CONFIGURABLE_KEYstatic StringVIEW_CONFIGURATION_PERMISSION_DISABLED
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description voiddisableFeatureForCurrentUser(@NotNull String featureKey)Disable a given feature for the current user.voiddisableFeatureForUser(@NotNull String featureKey, @NotNull com.atlassian.user.User user)Disable a given feature for a given user.voidenableFeatureForCurrentUser(@NotNull String featureKey)Enable a given feature for the current user.voidenableFeatureForUser(@NotNull String featureKey, @NotNull com.atlassian.user.User user)Enable a given feature for a given user.booleanisAtlassianAccountEnabled()Whether user profiles are managed by Atlassian AccountbooleanisCloudExportEnabled()Check if export for cloud is enabled (mainly view is available for users)booleanisExperimentalRestAdminApiEnabled()Deprecated.since 9.0 returns true.booleanisFeatureForCurrentUserEnabled(@NotNull String featureKey)Check whether a given feature key is enabled for the current user.booleanisFeatureForUserEnabled(@NotNull String featureKey, @NotNull com.atlassian.user.User user)Check whether a given feature key is enabled for a given user.booleanisImprovedAdminPanelNav()Whether improved navigation in administration panel is enabled.booleanisSimplifiedPlanConfigEnabled()Check whether the simplified plan configuration is enabled.booleanisViewConfigurationPermissionDisabled()Is VIEW_CONFIGURATION permission disabled.
-
-
-
Field Detail
-
SOX_COMPLIANCE_CONFIGURABLE_KEY
static final String SOX_COMPLIANCE_CONFIGURABLE_KEY
- See Also:
- Constant Field Values
-
CREATE_DEPLOYMENT_GRANTED_BY_PROJECT
static final String CREATE_DEPLOYMENT_GRANTED_BY_PROJECT
- See Also:
- Constant Field Values
-
VIEW_CONFIGURATION_PERMISSION_DISABLED
static final String VIEW_CONFIGURATION_PERMISSION_DISABLED
- See Also:
- Constant Field Values
-
RSS_CREATE_RESULT_IF_NO_CHANGES
static final String RSS_CREATE_RESULT_IF_NO_CHANGES
- See Also:
- Constant Field Values
-
-
Method Detail
-
isCloudExportEnabled
boolean isCloudExportEnabled()
Check if export for cloud is enabled (mainly view is available for users)- Returns:
- is export for cloud enabled
-
isSimplifiedPlanConfigEnabled
boolean isSimplifiedPlanConfigEnabled()
Check whether the simplified plan configuration is enabled.- Returns:
- is the simplified plan configuration enabled.
-
isExperimentalRestAdminApiEnabled
@Deprecated boolean isExperimentalRestAdminApiEnabled()
Deprecated.since 9.0 returns true.Always true.
-
isViewConfigurationPermissionDisabled
boolean isViewConfigurationPermissionDisabled()
Is VIEW_CONFIGURATION permission disabled.
-
isAtlassianAccountEnabled
boolean isAtlassianAccountEnabled()
Whether user profiles are managed by Atlassian Account- Returns:
- is Atlassian Account enabled or not
-
isImprovedAdminPanelNav
boolean isImprovedAdminPanelNav()
Whether improved navigation in administration panel is enabled.
-
enableFeatureForCurrentUser
void enableFeatureForCurrentUser(@NotNull @NotNull String featureKey)Enable a given feature for the current user.- Parameters:
featureKey- the feature key to be enabled.- Throws:
IllegalArgumentException- if the current user is not logged in.
-
enableFeatureForUser
void enableFeatureForUser(@NotNull @NotNull String featureKey, @NotNull @NotNull com.atlassian.user.User user)Enable a given feature for a given user.- Parameters:
featureKey- the feature key to be enabled.user- the user for which the feature should be enabled.- Throws:
org.acegisecurity.AccessDeniedException- if the current user is not an admin.
-
disableFeatureForCurrentUser
void disableFeatureForCurrentUser(@NotNull @NotNull String featureKey)Disable a given feature for the current user.- Parameters:
featureKey- the feature key to be enabled.- Throws:
IllegalArgumentException- if the current user is not logged in.
-
disableFeatureForUser
void disableFeatureForUser(@NotNull @NotNull String featureKey, @NotNull @NotNull com.atlassian.user.User user)Disable a given feature for a given user.- Parameters:
featureKey- the feature key to be disabled.user- the user for which the feature should be disabled.- Throws:
org.acegisecurity.AccessDeniedException- if the current user is not an admin.
-
isFeatureForUserEnabled
boolean isFeatureForUserEnabled(@NotNull @NotNull String featureKey, @NotNull @NotNull com.atlassian.user.User user)Check whether a given feature key is enabled for a given user. Apart from checking whether the feature is enabled for the given user, this will also check site-wide enabled features.- Parameters:
featureKey- the feature keyuser- the user- Returns:
- whether the feature key is enabled for the given user.
-
isFeatureForCurrentUserEnabled
boolean isFeatureForCurrentUserEnabled(@NotNull @NotNull String featureKey)Check whether a given feature key is enabled for the current user. Apart from checking whether the feature is enabled for the current user, this will also check site-wide enabled features.- Parameters:
featureKey- the feature key- Returns:
- whether the feature key is enabled for the current user.
-
-