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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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
Whether user profiles are managed by Atlassian Accountboolean
Check if export for cloud is enabled (mainly view is available for users)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
Whether improved navigation in administration panel is enabled.boolean
Check whether the simplified plan configuration is enabled.boolean
Deprecated.since 10.0 returns false
-
Field Details
-
SOX_COMPLIANCE_CONFIGURABLE_KEY
- See Also:
-
CREATE_DEPLOYMENT_GRANTED_BY_PROJECT
- See Also:
-
RSS_CREATE_RESULT_IF_NO_CHANGES
- See Also:
-
-
Method Details
-
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.
-
isViewConfigurationPermissionDisabled
Deprecated.since 10.0 returns falseIs VIEW_CONFIGURATION permission disabled. -
isAtlassianAccountEnabled
boolean isAtlassianAccountEnabled()Whether user profiles are managed by Atlassian Account- Returns:
- is Atlassian Account enabled or not
-
enableFeatureForCurrentUser
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
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
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.
-