lib/seek/permissions/policy_based_authorization.rb
def people_can_manage
        contributor = self.contributor.kind_of?(Person) ? self.contributor : self.contributor.try(:person)
        return [[contributor.id, "#{contributor.first_name} #{contributor.last_name}", Policy::MANAGING]] if policy.blank?
        creators = is_downloadable? ? self.creators : []
        asset_managers = (projects & contributor.former_projects).collect(&:asset_housekeepers).flatten
        grouped_people_by_access_type = policy.summarize_permissions creators,asset_managers, contributor
        grouped_people_by_access_type[Policy::MANAGING]
      end
#use request_permission_summary to retrieve who can manage the item
use request_permission_summary to retrieve who can manage the item
use request_permission_summary to retrieve who can manage the item
def people_can_manage
        contributor = self.contributor.kind_of?(Person) ? self.contributor : self.contributor.try(:person)
        return [[contributor.id, "#{contributor.first_name} #{contributor.last_name}", Policy::MANAGING]] if policy.blank?
        creators = is_downloadable? ? self.creators : []
        asset_managers = (projects & contributor.former_projects).collect(&:asset_housekeepers).flatten
        grouped_people_by_access_type = policy.summarize_permissions creators,asset_managers, contributor
        grouped_people_by_access_type[Policy::MANAGING]
      end
def people_can_manage contributor = self . contributor . kind_of? ( Person ) ? self . contributor : self . contributor . try ( :person ) return [ [ contributor . id , "#{contributor.first_name} #{contributor.last_name}" , Policy :: MANAGING ] ] if policy . blank? creators = is_downloadable? ? self . creators : [ ] asset_managers = ( projects & contributor . former_projects ) . collect ( & :asset_housekeepers ) . flatten grouped_people_by_access_type = policy . summarize_permissions creators , asset_managers , contributor grouped_people_by_access_type [ Policy :: MANAGING ] end
use request_permission_summary to retrieve who can manage the item
use request_permission_summary to retrieve who can manage the item