]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-2840 Do not display JDBC settings when user is not administrator
authorSimon Brandhof <simon.brandhof@gmail.com>
Tue, 27 Sep 2011 15:39:12 +0000 (17:39 +0200)
committerSimon Brandhof <simon.brandhof@gmail.com>
Tue, 27 Sep 2011 15:39:12 +0000 (17:39 +0200)
sonar-server/src/main/webapp/WEB-INF/app/controllers/setup_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/views/setup/index.html.erb [deleted file]

index 5917f3b2f4d18b7e33c19462ba70e9edbf86e171..7f1eb4d9ef8244042377a0e1f0900af415d8917d 100644 (file)
@@ -22,12 +22,11 @@ class SetupController < ApplicationController
 
   SECTION=Navigation::SECTION_CONFIGURATION
   
-  # GETs should be safe (see http://www.w3.org/2001/tag/doc/whenToUseGet.html)
   verify :method => :post, :only => [ :setup_database ], :redirect_to => { :action => :index }
     
   def index
     if DatabaseVersion.uptodate?
-      render :template => 'setup/index'
+      redirect_to home_path
     elsif ActiveRecord::Base.connected?
       render :template => (DatabaseVersion.upgradable? ? 'setup/form' : 'setup/not_upgradable'), :layout => 'nonav'
     else 
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/setup/index.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/setup/index.html.erb
deleted file mode 100644 (file)
index 0ccbbfe..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-<h2>Database settings.</h2>
-<table>
-  <tr>
-    <td>URL: &nbsp;&nbsp;</td>
-    <td><%= configuration('sonar.jdbc.url', '') -%>
-  </tr>
-  <tr>
-    <td>Login: &nbsp;&nbsp;</td>
-    <td><%= configuration('sonar.jdbc.username', '') -%>
-  </tr>
-  <tr>
-    <td>Driver: &nbsp;&nbsp;</td>
-    <td><%= configuration('sonar.jdbc.driverClassName', '') -%>
-  </tr>
-</table>