mirror of
https://github.com/Retrospring/retrospring.git
synced 2025-01-19 04:26:03 +01:00
added privileged? helper
This commit is contained in:
parent
8dff4462cf
commit
e128686297
1 changed files with 8 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue