aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-server/src/main/webapp/WEB-INF/app/helpers
diff options
context:
space:
mode:
authorsimonbrandhof <simon.brandhof@gmail.com>2010-09-07 12:10:01 +0000
committersimonbrandhof <simon.brandhof@gmail.com>2010-09-07 12:10:01 +0000
commitfbdd9d383da7b3ee7cdddfd3fccc9ef46d9fc206 (patch)
treea011a53cfb11e941754eb1a09178d542309625b4 /sonar-server/src/main/webapp/WEB-INF/app/helpers
parent89ee2d1df9b81cf3a8f50adafbd798e28d79ae1a (diff)
downloadsonarqube-fbdd9d383da7b3ee7cdddfd3fccc9ef46d9fc206.tar.gz
sonarqube-fbdd9d383da7b3ee7cdddfd3fccc9ef46d9fc206.zip
SONAR-1290 Improve SQL requests on the Q profiles page
Diffstat (limited to 'sonar-server/src/main/webapp/WEB-INF/app/helpers')
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/helpers/application_helper.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/helpers/application_helper.rb b/sonar-server/src/main/webapp/WEB-INF/app/helpers/application_helper.rb
index 0cd379eed98..92ac5eabba9 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/helpers/application_helper.rb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/helpers/application_helper.rb
@@ -30,6 +30,14 @@ module ApplicationHelper
Java::OrgSonarServerPlatform::Platform.getServer().getVersion()
end
+ # shortcut for the method is_admin?() without parameters. Result is kept in cache.
+ def administrator?
+ @is_administrator ||=
+ begin
+ is_admin?
+ end
+ end
+
def qualifier_icon(object)
qualifier=(object.respond_to?('qualifier') ? object.qualifier : object.to_s)
if qualifier