photomix/app/helpers/users_helper.rb
2009-06-09 00:30:22 +02:00

10 lines
231 B
Ruby

module UsersHelper
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
end