Files
fizzy/app/controllers/concerns/authorization.rb
T
David Heinemeier Hansson 60a429e463 Use more naturally-sounding ensures
These match Basecamp and the existing predicate methods
2025-10-29 13:33:34 +01:00

11 lines
192 B
Ruby

module Authorization
private
def ensure_admin
head :forbidden unless Current.user.admin?
end
def ensure_staff
head :forbidden unless Current.user.staff?
end
end