// FindByRole finds a matching policy by its role
FindByRole finds a matching policy by its role
// FindByRole finds a matching policy by its role
func (s *PolicyStorage) FindByRole(q FindByRoleQuery) *recommendations.Policy {
	for _, policy := range s.policies {
		if policy.Identity.Role == q.Role && policy.Status == q.Status {
			return &policy
		}
	}
	return nil
}
func ( s * PolicyStorage ) FindByRole ( q FindByRoleQuery ) * recommendations . Policy { for _ , policy := range s . policies { if policy . Identity . Role == q . Role && policy . Status == q . Status { return & policy } } return nil }
FindByRole finds a matching policy by its role
FindByRole finds a matching policy by its role