From 28a89e360f720c5ca7fb71319beb2519adad5972 Mon Sep 17 00:00:00 2001 From: HesterG Date: Wed, 31 May 2023 09:39:54 +0800 Subject: Add user level action runners (#24995) Used similar logic to organization. Screen Shot 2023-05-30 at 10 18 06 Screen Shot 2023-05-30 at 10 31 18 --- models/actions/runner.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'models/actions') diff --git a/models/actions/runner.go b/models/actions/runner.go index f1638eb0ba..bf703c444b 100644 --- a/models/actions/runner.go +++ b/models/actions/runner.go @@ -69,7 +69,11 @@ func (r *ActionRunner) BelongsToOwnerType() types.OwnerType { return types.OwnerTypeRepository } if r.OwnerID != 0 { - return types.OwnerTypeOrganization + if r.Owner.Type == user_model.UserTypeOrganization { + return types.OwnerTypeOrganization + } else if r.Owner.Type == user_model.UserTypeIndividual { + return types.OwnerTypeIndividual + } } return types.OwnerTypeSystemGlobal } -- cgit v1.2.3