2015-05-05 03:10:25 +02:00
|
|
|
class AvailabilityPolicy < ApplicationPolicy
|
2017-09-06 15:01:41 +02:00
|
|
|
%w(index? show? create? update? destroy? reservations? export? lock?).each do |action|
|
2015-05-05 03:10:25 +02:00
|
|
|
define_method action do
|
|
|
|
user.is_admin?
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|