Submit social housing lettings and sales data (CORE)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
476 B

class OrganisationRelationshipPolicy
attr_reader :user, :organisation_relationship
def initialize(user, organisation_relationship)
@user = user
@organisation_relationship = organisation_relationship
end
%w[
add_stock_owner?
create_stock_owner?
remove_stock_owner?
add_managing_agent?
create_managing_agent?
remove_managing_agent?
].each do |method_name|
define_method method_name do
!user.data_provider?
end
end
end