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 -
Method Summary
Modifier and TypeMethodDescriptionvoiddisableFeatureForCurrentUser(@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.booleanWhether user profiles are managed by Atlassian AccountbooleanCheck if export for cloud is enabled (mainly view is available for users)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.booleanWhether improved navigation in administration panel is enabled.booleanDeprecated.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
-
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.
-