func (a *Actors) IsActor(ctx context.Context, prctx pull.Context, user string) (bool, error) {
	for _, u := range a.Users {
		if user == u {
			return true, nil
		}
	}

	for _, t := range a.Teams {
		member, err := prctx.IsTeamMember(t, user)
		if err != nil {
			return false, errors.Wrap(err, "failed to get team membership")
		}
		if member {
			return true, nil
		}
	}

	for _, o := range a.Organizations {
		member, err := prctx.IsOrgMember(o, user)
		if err != nil {
			return false, errors.Wrap(err, "failed to get org membership")
		}
		if member {
			return true, nil
		}
	}

	return false, nil
}
// IsActor returns true if the given user satisfies at least one of the
// conditions in this structure.
IsActor returns true if the given user satisfies at least one of the
conditions in this structure.
// IsActor returns true if the given user satisfies at least one of the // conditions in this structure .
func (a *Actors) IsActor(ctx context.Context, prctx pull.Context, user string) (bool, error) {
	for _, u := range a.Users {
		if user == u {
			return true, nil
		}
	}
	for _, t := range a.Teams {
		member, err := prctx.IsTeamMember(t, user)
		if err != nil {
			return false, errors.Wrap(err, "failed to get team membership")
		}
		if member {
			return true, nil
		}
	}
	for _, o := range a.Organizations {
		member, err := prctx.IsOrgMember(o, user)
		if err != nil {
			return false, errors.Wrap(err, "failed to get org membership")
		}
		if member {
			return true, nil
		}
	}
	return false, nil
}
func ( a * Actors ) IsActor ( ctx context . Context , prctx pull . Context , user string ) ( bool , error ) { for _ , u := range a . Users { if user == u { return true , nil } } for _ , t := range a . Teams { member , err := prctx . IsTeamMember ( t , user ) if err != nil { return false , errors . Wrap ( err , " " ) } if member { return true , nil } } for _ , o := range a . Organizations { member , err := prctx . IsOrgMember ( o , user ) if err != nil { return false , errors . Wrap ( err , " " ) } if member { return true , nil } } return false , nil }
IsActor returns true if the given user satisfies at least one of the
conditions in this structure.
IsActor returns true if the given user satisfies at least one of the conditions in this structure .