Fix admin user list (#15358) (#15359)

* Fix `admin user list` (#15358)

* fix routers/api/v1/repo/issue.go
This commit is contained in:
6543 2021-04-09 12:39:40 +02:00 committed by GitHub
parent 942b0360ad
commit b072907987
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 4 deletions

View file

@ -239,10 +239,10 @@ func (u *User) GetEmail() string {
return u.Email
}
// GetAllUsers returns a slice of all users found in DB.
// GetAllUsers returns a slice of all individual users found in DB.
func GetAllUsers() ([]*User, error) {
users := make([]*User, 0)
return users, x.OrderBy("id").Find(&users)
return users, x.OrderBy("id").Where("type = ?", UserTypeIndividual).Find(&users)
}
// IsLocal returns true if user login type is LoginPlain.