Package com.atlassian.bamboo
Interface DarkFeatureService
-
- All Known Implementing Classes:
DefaultDarkFeatureService
@Internal public interface DarkFeatureService
An 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 String
CREATE_DEPLOYMENT_GRANTED_BY_PROJECT
static String
RSS_CREATE_RESULT_IF_NO_CHANGES
static String
SOX_COMPLIANCE_CONFIGURABLE_KEY
static String
VIEW_CONFIGURATION_PERMISSION_DISABLED
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
disableFeatureForCurrentUser(@NotNull String featureKey)
Disable a given feature for the current user.void
disableFeatureForUser(@NotNull String featureKey, @NotNull com.atlassian.user.User user)
Disable a given feature for a given user.void
enableFeatureForCurrentUser(@NotNull String featureKey)
Enable a given feature for the current user.void
enableFeatureForUser(@NotNull String featureKey, @NotNull com.atlassian.user.User user)
Enable a given feature for a given user.boolean
isAtlassianAccountEnabled()
Whether user profiles are managed by Atlassian Accountboolean
isCloudExportEnabled()
Check if export for cloud is enabled (mainly view is available for users)boolean
isExperimentalRestAdminApiEnabled()
Deprecated.since 9.0 returns true.boolean
isFeatureForCurrentUserEnabled(@NotNull String featureKey)
Check whether a given feature key is enabled for the current user.boolean
isFeatureForUserEnabled(@NotNull String featureKey, @NotNull com.atlassian.user.User user)
Check whether a given feature key is enabled for a given user.boolean
isImprovedAdminPanelNav()
Whether improved navigation in administration panel is enabled.boolean
isSimplifiedPlanConfigEnabled()
Check whether the simplified plan configuration is enabled.boolean
isViewConfigurationPermissionDisabled()
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.
-
-