aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-server/src/main/webapp/WEB-INF/app/models/dashboard.rb
diff options
context:
space:
mode:
authorsimonbrandhof <simon.brandhof@gmail.com>2010-10-28 14:53:29 +0000
committersimonbrandhof <simon.brandhof@gmail.com>2010-10-28 14:53:29 +0000
commit11004fa74dbb211a6c5ec7bbff9d3d4e13e7964d (patch)
tree02373c3a4761ed47860c449f004bc3b7b80e359d /sonar-server/src/main/webapp/WEB-INF/app/models/dashboard.rb
parentb918fe7c6647285b0584c5d1682102f9e8835c62 (diff)
downloadsonarqube-11004fa74dbb211a6c5ec7bbff9d3d4e13e7964d.tar.gz
sonarqube-11004fa74dbb211a6c5ec7bbff9d3d4e13e7964d.zip
SONAR-1643 improve display of widgets to add + administrators can edit the default dashboard
Diffstat (limited to 'sonar-server/src/main/webapp/WEB-INF/app/models/dashboard.rb')
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/models/dashboard.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/dashboard.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/dashboard.rb
index bbcc70ee061..11416159f18 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/models/dashboard.rb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/models/dashboard.rb
@@ -37,7 +37,7 @@ class Dashboard < ActiveRecord::Base
end
def editable_by?(user)
- (user && user_id==user.id) || (user_id.nil? && user.has_role?(:admin))
+ (user && self.user_id==user.id) || (user_id.nil? && user.has_role?(:admin))
end
def owner?(user)