mirror of
1
Fork 0
forgejo/models/user
Lunny Xiao f663773200
Fix limited user cannot view himself's profile (#21212)
backport #21210, fix #21206

If user and viewer are equal the method should return true.
Also the common organization check was wrong as count can never be less then 0.

Tests are on main branch.
2022-09-20 16:00:46 +08:00
..
avatar.go Move almost all functions' parameter db.Engine to context.Context (#19748) 2022-05-20 22:08:52 +08:00
email_address.go Move almost all functions' parameter db.Engine to context.Context (#19748) 2022-05-20 22:08:52 +08:00
email_address_test.go Move tests as seperate sub packages to reduce duplicated file names (#19951) 2022-06-15 09:02:00 +02:00
error.go Move user related model into models/user (#17781) 2021-11-24 17:49:20 +08:00
external_login_user.go add test coverage for original author conversion during migrations (#18506) 2022-02-01 13:20:28 -05:00
follow.go Remove NewSession method from db.Engine interface (#17577) 2021-11-21 23:41:00 +08:00
follow_test.go Move tests as seperate sub packages to reduce duplicated file names (#19951) 2022-06-15 09:02:00 +02:00
list.go Move almost all functions' parameter db.Engine to context.Context (#19748) 2022-05-20 22:08:52 +08:00
main_test.go Move tests as seperate sub packages to reduce duplicated file names (#19951) 2022-06-15 09:02:00 +02:00
openid.go Move almost all functions' parameter db.Engine to context.Context (#19748) 2022-05-20 22:08:52 +08:00
openid_test.go Move tests as seperate sub packages to reduce duplicated file names (#19951) 2022-06-15 09:02:00 +02:00
redirect.go Move EmailAddress & UserRedirect into models/user/ (#17607) 2021-11-11 15:03:30 +08:00
redirect_test.go Move tests as seperate sub packages to reduce duplicated file names (#19951) 2022-06-15 09:02:00 +02:00
search.go Add migrate repo archiver and packages storage support on command line (#20757) (#20806) 2022-08-18 09:27:56 +08:00
setting.go Add config options to hide issue events (#17414) 2022-01-21 18:59:26 +01:00
setting_keys.go Added auto-save whitespace behavior if it changed manually (#15566) 2022-02-08 14:15:04 +08:00
setting_test.go Move tests as seperate sub packages to reduce duplicated file names (#19951) 2022-06-15 09:02:00 +02:00
user.go Fix limited user cannot view himself's profile (#21212) 2022-09-20 16:00:46 +08:00
user_test.go Move tests as seperate sub packages to reduce duplicated file names (#19951) 2022-06-15 09:02:00 +02:00