summaryrefslogtreecommitdiffstats
path: root/sonar-server
diff options
context:
space:
mode:
authorsimonbrandhof <simon.brandhof@gmail.com>2010-10-18 12:11:58 +0000
committersimonbrandhof <simon.brandhof@gmail.com>2010-10-18 12:11:58 +0000
commit5dc61ea81e347ce3f5048433f42d18d2f75f6918 (patch)
tree59b4430385a1c812cecca1ccb0536c3cdb62ce99 /sonar-server
parent7ac4355ccf1dc10656f2d9c8b0eb0307d6fbcfae (diff)
downloadsonarqube-5dc61ea81e347ce3f5048433f42d18d2f75f6918.tar.gz
sonarqube-5dc61ea81e347ce3f5048433f42d18d2f75f6918.zip
VIEWS-55 Check user authorization on masterproject
Diffstat (limited to 'sonar-server')
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/controllers/filters_controller.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/filters_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/filters_controller.rb
index e888fcd4930..7396fbb9d5b 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/filters_controller.rb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/filters_controller.rb
@@ -459,6 +459,7 @@ class FiltersController < ApplicationController
def load_masterproject()
@masterproject=Snapshot.find(:first, :include => 'project', :conditions => ['projects.kee=? and islast=?', 'MASTER_PROJECT', true])
+ @masterproject=nil if @masterproject && !(has_role?(:user, @masterproject))
end
def load_active_filter()