Change order of possible-owner organizations to alphabetical (#13160)

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
tokarchuk/v1.17
Elena Neuschild 4 years ago committed by GitHub
parent c8f7a6b774
commit 4fbe64572c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      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.

Loading…
Cancel
Save