]> source.dussan.org Git - sonarqube.git/commitdiff
Fix quality flaws
authorJulien Lancelot <julien.lancelot@gmail.com>
Mon, 17 Jun 2013 09:37:11 +0000 (11:37 +0200)
committerJulien Lancelot <julien.lancelot@gmail.com>
Mon, 17 Jun 2013 09:37:22 +0000 (11:37 +0200)
sonar-core/src/main/java/org/sonar/core/issue/DefaultIssueFilter.java
sonar-server/src/main/java/org/sonar/server/issue/IssueFilterService.java

index 020f89b1ae2947b750881280aecf8fb02812063b..7b72bf621ac563cd3fecc59c1902c7db915a8c48 100644 (file)
@@ -37,9 +37,9 @@ import static com.google.common.collect.Maps.newHashMap;
 
 public class DefaultIssueFilter {
 
-  public final static String SEPARATOR = "|";
-  public final static String KEY_VALUE_SEPARATOR = "=";
-  public final static String LIST_SEPARATOR = ",";
+  public static final String SEPARATOR = "|";
+  public static final String KEY_VALUE_SEPARATOR = "=";
+  public static final String LIST_SEPARATOR = ",";
 
   private Long id;
   private String name;
index 61dd367abc3f6ac03151dc84de5ec36fb001616e..7b0abcffa85f830c0f3d1e727cf515e81f2cf325 100644 (file)
@@ -63,9 +63,10 @@ public class IssueFilterService implements ServerComponent {
   }
 
   public DefaultIssueFilter save(DefaultIssueFilter issueFilter, UserSession userSession) {
-    issueFilter.setUser(userSession.login());
     // TODO
 //    checkAuthorization(userSession, project, UserRole.ADMIN);
+    verifyLoggedIn(userSession);
+    issueFilter.setUser(userSession.login());
     IssueFilterDto issueFilterDto = IssueFilterDto.toIssueFilter(issueFilter);
     issueFilterDao.insert(issueFilterDto);
     return issueFilterDto.toIssueFilter();
@@ -74,6 +75,7 @@ public class IssueFilterService implements ServerComponent {
   public DefaultIssueFilter update(DefaultIssueFilter issueFilter, UserSession userSession) {
     // TODO
 //    checkAuthorization(userSession, project, UserRole.ADMIN);
+    verifyLoggedIn(userSession);
     issueFilterDao.update(IssueFilterDto.toIssueFilter(issueFilter));
     return issueFilter;
   }
@@ -81,6 +83,7 @@ public class IssueFilterService implements ServerComponent {
   public void delete(Long issueFilterId, UserSession userSession) {
     // TODO
     //checkAuthorization(userSession, findActionPlanDto(actionPlanKey).getProjectKey(), UserRole.ADMIN);
+    verifyLoggedIn(userSession);
     issueFilterDao.delete(issueFilterId);
   }