aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-server
diff options
context:
space:
mode:
authorDavid Gageot <david@gageot.net>2012-05-02 15:32:40 +0200
committerDavid Gageot <david@gageot.net>2012-05-02 15:40:11 +0200
commit06eff341677daf1dd73c8d03da76f154c642f785 (patch)
treee42c27d1e73a393e4f06a4ef08a40bbd2db6340c /sonar-server
parentc212266913c0d8c41e35461204ae3686e1d7fedc (diff)
downloadsonarqube-06eff341677daf1dd73c8d03da76f154c642f785.tar.gz
sonarqube-06eff341677daf1dd73c8d03da76f154c642f785.zip
Should be able to add a manual violation on a unit test
Diffstat (limited to 'sonar-server')
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/controllers/resource_controller.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/resource_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/resource_controller.rb
index 6ae87b82df2..330fbeeeeb8 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/resource_controller.rb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/resource_controller.rb
@@ -83,7 +83,6 @@ class ResourceController < ApplicationController
def create_violation
resource = Project.by_key(params[:resource])
access_denied unless resource && current_user
- bad_request(message('code_viewer.create_violation.unit_test_not_supported')) if resource.test?
rule_id_or_name = params[:rule]
if rule_id_or_name.blank?
@@ -143,7 +142,7 @@ class ResourceController < ApplicationController
def load_sources
@period = params[:period].to_i unless params[:period].blank?
@expanded=(params[:expand]=='true')
- @display_manual_violation_form=(current_user && has_role?(:user, @snapshot) && !@snapshot.test?)
+ @display_manual_violation_form=(current_user && has_role?(:user, @snapshot))
if @snapshot.source
source_lines=@snapshot.source.syntax_highlighted_lines()
init_scm()