You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixes#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.
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
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.
Description
A user with limited visibility cannot open the profile page and gets an HTTPNotFound error (404). It works if the user sets the visibility to public.
In
models\user\user.go
(IsUserVisibleToViewer
) no check is made if the user in question is also the viewer, which should be allowed in my opinion.As an admin, I can see my profile and all the other users profiles.
Log (user is called
foo_bar
):Gitea Version
1.17.2
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
2.20.1
Operating System
Debian 10 Buster
How are you running Gitea?
Binary using systemd service unit.
Database
PostgreSQL
The text was updated successfully, but these errors were encountered: