aboutsummaryrefslogtreecommitdiffstats
path: root/models/org.go
diff options
context:
space:
mode:
authorElena Neuschild <eneuschild@gmail.com>2020-10-16 00:15:55 +0200
committerGitHub <noreply@github.com>2020-10-15 18:15:55 -0400
commit4fbe64572c2ada0ddf1ad984ae5cc9e28ba75687 (patch)
treed418e474cd62d97d03cd009700a85ff7cbffcd43 /models/org.go
parentc8f7a6b7742cf42057b6d220ef93ff7f939bb94f (diff)
downloadgitea-4fbe64572c2ada0ddf1ad984ae5cc9e28ba75687.tar.gz
gitea-4fbe64572c2ada0ddf1ad984ae5cc9e28ba75687.zip
Change order of possible-owner organizations to alphabetical (#13160)
Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'models/org.go')
-rw-r--r--models/org.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/models/org.go b/models/org.go
index b24db935a4..84f2892e4a 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.