aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-server/src/main/webapp/WEB-INF/app/controllers/issue_controller.rb
diff options
context:
space:
mode:
authorJulien Lancelot <julien.lancelot@gmail.com>2013-05-06 15:31:43 +0200
committerJulien Lancelot <julien.lancelot@gmail.com>2013-05-06 15:31:43 +0200
commit64c32fee7aff48958d1253854f9020e981f4c3f0 (patch)
treea195a6ae7bb9dad263fc3cb5885ef2b99ed91cae /sonar-server/src/main/webapp/WEB-INF/app/controllers/issue_controller.rb
parent740b4c7713b384788591997f4fccdc1eb5b2f987 (diff)
downloadsonarqube-64c32fee7aff48958d1253854f9020e981f4c3f0.tar.gz
sonarqube-64c32fee7aff48958d1253854f9020e981f4c3f0.zip
SONAR-3755 Do not load transitions if not loggued
Diffstat (limited to 'sonar-server/src/main/webapp/WEB-INF/app/controllers/issue_controller.rb')
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/controllers/issue_controller.rb15
1 files changed, 7 insertions, 8 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/issue_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/issue_controller.rb
index c5ed9cf1ec7..d9d93ee6d49 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/issue_controller.rb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/issue_controller.rb
@@ -36,18 +36,14 @@ class IssueController < ApplicationController
require_parameters :id
init_issue(params[:id])
init_resource
-
- @transitions = Internal.issues.listTransitions(@issue.key)
+ @transitions = Internal.issues.listTransitions(@issue.key) if current_user
render 'issue/_view'
end
def show
require_parameters :key
init_issue(params[:key])
- init_resource
-
- @transitions = Internal.issues.listTransitions(@issue.key)
- render :partial => 'issue/view'
+ render_issue_detail
end
def transition_form
@@ -65,6 +61,7 @@ class IssueController < ApplicationController
require_parameters :issue, :transition
@issue = Internal.issues.doTransition(params[:issue], params[:transition])
+ init_issue(params[:issue])
render_issue_detail
end
@@ -88,6 +85,7 @@ class IssueController < ApplicationController
end
@issue = Internal.issues.assign(params[:issue], assignee)
+ init_issue(params[:issue])
render_issue_detail
end
@@ -103,6 +101,7 @@ class IssueController < ApplicationController
require_parameters :issue, :severity
@issue = Internal.issues.setSeverity(params[:issue], params[:severity])
+ init_issue(params[:issue])
render_issue_detail
end
@@ -189,7 +188,7 @@ class IssueController < ApplicationController
def render_issue_detail
if @issue
init_resource
- @transitions = Internal.issues.listTransitions(@issue.key)
+ @transitions = Internal.issues.listTransitions(@issue.key) if current_user
render :partial => 'issue/view'
else
# TODO
@@ -199,7 +198,7 @@ class IssueController < ApplicationController
def render_issue_code_viewer
if @issue
- @transitions = Internal.issues.listTransitions(@issue.key)
+ @transitions = Internal.issues.listTransitions(@issue.key) if current_user
render :partial => 'resource/issue', :locals => {:issue => @issue}
else
# TODO