From 4fbe64572c2ada0ddf1ad984ae5cc9e28ba75687 Mon Sep 17 00:00:00 2001 From: Elena Neuschild Date: Fri, 16 Oct 2020 00:15:55 +0200 Subject: [PATCH] Change order of possible-owner organizations to alphabetical (#13160) Co-authored-by: Lauris BH Co-authored-by: techknowlogick --- models/org.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/models/org.go b/models/org.go index b24db935a4e..84f2892e4a1 100644 --- a/models/org.go +++ b/models/org.go @@ -476,7 +476,8 @@ func GetOrgsCanCreateRepoByUserID(userID int64) ([]*User, error) { Join("INNER", "`team`", "`team`.id = `team_user`.team_id"). Where(builder.Eq{"`team_user`.uid": userID}). And(builder.Eq{"`team`.authorize": AccessModeOwner}.Or(builder.Eq{"`team`.can_create_org_repo": true})))). - Desc("`user`.updated_unix").Find(&orgs) + Asc("`user`.name"). + Find(&orgs) } // GetOrgUsersByUserID returns all organization-user relations by user ID.