diff options
author | Seb Bacon <seb.bacon@gmail.com> | 2012-06-27 13:43:51 +0100 |
---|---|---|
committer | Seb Bacon <seb.bacon@gmail.com> | 2012-06-27 13:43:51 +0100 |
commit | d8bd992a3723a5f3d484a2343f402337fbdfdc5e (patch) | |
tree | c04a4a176c5bc21c2f2311a6913f7d75750fffcf /app/helpers/application_helper.rb | |
parent | 25248d5255b9adced28160fba3b11f61d4eff189 (diff) |
Show the admin navigation bar when browsing the main site. Fixes #512
Diffstat (limited to 'app/helpers/application_helper.rb')
-rw-r--r-- | app/helpers/application_helper.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index cb6615199..278df5a3b 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -132,5 +132,9 @@ module ApplicationHelper return "#{exact_date} (#{ago_text})" end + def is_admin? + return !session[:using_admin].nil? || (!@user.nil? && @user.admin_level == "super") + end + end |