1
0
Fork 0
forked from forgejo/forgejo

Hide some user information via API if user have no enough permission (#8655)

* Hide some user information via API if user have no enough permission

* fix test
This commit is contained in:
Lunny Xiao 2019-10-24 10:52:17 +08:00 committed by GitHub
parent ab791fe7bb
commit bd7709a602
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 5 deletions

View file

@ -29,7 +29,6 @@ func TestAPITeamUser(t *testing.T) {
var user2 *api.User
DecodeJSON(t, resp, &user2)
user2.Created = user2.Created.In(time.Local)
user2.LastLogin = user2.LastLogin.In(time.Local)
user := models.AssertExistsAndLoadBean(t, &models.User{Name: "user2"}).(*models.User)
assert.Equal(t, convert.ToUser(user, true, false), user2)