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.
 
 
 
 

24 lines
477 B

class OrganisationPolicy
attr_reader :user, :organisation
def initialize(user, organisation)
@user = user
@organisation = organisation
end
def deactivate?
user.support? && organisation.status == :active
end
def reactivate?
user.support? && organisation.status == :deactivated
end
def delete_confirmation?
delete?
end
def delete?
user.support? && (organisation.status == :deactivated || organisation.status == :merged)
end
end