photomix/app/helpers/users_helper.rb

10 lines
231 B
Ruby
Raw Normal View History

2009-05-22 16:14:07 +02:00
module UsersHelper
2009-06-09 00:30:22 +02:00
def has_permission?(permissions = [])
return current_user && current_user.has_permission?(permissions)
end
def has_role?(roles = [])
return current_user && current_user.in_role?(roles)
end
2009-05-22 16:14:07 +02:00
end