added privileged? helper

This commit is contained in:
nilsding 2014-11-27 11:50:10 +01:00
parent 8dff4462cf
commit e128686297
1 changed files with 8 additions and 0 deletions

View File

@ -45,4 +45,12 @@ module ApplicationHelper
return nil unless count.count > 0
count.count
end
def privileged?
if current_user && current_user.admin?
true
else
false
end
end
end