aboutsummaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2015-10-06 14:11:46 +0200
committerSimon Brandhof <simon.brandhof@sonarsource.com>2015-10-06 14:12:00 +0200
commit8cb9998c835221d527572d76753a587886df0fa4 (patch)
tree0eb874959cb0675e15d2b50b785d47e7af7e37e0 /server
parent559cb2db86e52bc23bd432edc550ba8743e8f333 (diff)
downloadsonarqube-8cb9998c835221d527572d76753a587886df0fa4.tar.gz
sonarqube-8cb9998c835221d527572d76753a587886df0fa4.zip
SONAR-6834 Fix location of showBackgroundTasks in response of api/navigation/component
Diffstat (limited to 'server')
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/ui/ws/ComponentNavigationAction.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/sonar-server/src/main/java/org/sonar/server/ui/ws/ComponentNavigationAction.java b/server/sonar-server/src/main/java/org/sonar/server/ui/ws/ComponentNavigationAction.java
index 6fcfa27eb6a..9847442329f 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/ui/ws/ComponentNavigationAction.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/ui/ws/ComponentNavigationAction.java
@@ -140,7 +140,6 @@ public class ComponentNavigationAction implements NavigationWsAction {
.prop("name", component.name())
.prop("isComparable", componentTypeHasProperty(component, PROPERTY_COMPARABLE))
.prop("canBeFavorite", userSession.isLoggedIn())
- .prop("showBackgroundTasks", ActivityWsAction.isAllowedOnComponentUuid(userSession, component.uuid()))
.prop("isFavorite", isFavourite(session, component, userSession));
List<DashboardDto> dashboards = activeDashboardDao.selectProjectDashboardsForUserLogin(session, userSession.getLogin());
@@ -200,7 +199,7 @@ public class ComponentNavigationAction implements NavigationWsAction {
return componentKey;
}
- private void writeDashboards(JsonWriter json, List<DashboardDto> dashboards) {
+ private static void writeDashboards(JsonWriter json, List<DashboardDto> dashboards) {
json.name("dashboards").beginArray();
for (DashboardDto dashboard : dashboards) {
json.beginObject()
@@ -242,6 +241,7 @@ public class ComponentNavigationAction implements NavigationWsAction {
json.prop("showHistory", isAdmin && componentTypeHasProperty(component, PROPERTY_MODIFIABLE_HISTORY));
json.prop("showUpdateKey", isAdmin && componentTypeHasProperty(component, PROPERTY_UPDATABLE_KEY));
json.prop("showDeletion", isAdmin && componentTypeHasProperty(component, PROPERTY_DELETABLE));
+ json.prop("showBackgroundTasks", ActivityWsAction.isAllowedOnComponentUuid(userSession, component.uuid()));
}
private boolean componentTypeHasProperty(ComponentDto component, String resourceTypeProperty) {