mirror of
https://github.com/go-gitea/gitea
synced 2025-07-29 05:38:37 +00:00
Fix user visible check (#21210)
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>
This commit is contained in:
@@ -345,7 +345,7 @@
|
||||
avatar_email: user19@example.com
|
||||
num_repos: 2
|
||||
is_active: true
|
||||
num_members: 1
|
||||
num_members: 2
|
||||
num_teams: 1
|
||||
|
||||
-
|
||||
@@ -572,6 +572,8 @@
|
||||
avatar: avatar31
|
||||
avatar_email: user31@example.com
|
||||
num_repos: 0
|
||||
num_followers: 0
|
||||
num_following: 1
|
||||
is_active: true
|
||||
|
||||
-
|
||||
@@ -590,3 +592,23 @@
|
||||
avatar_email: user30@example.com
|
||||
num_repos: 0
|
||||
is_active: true
|
||||
|
||||
-
|
||||
id: 33
|
||||
lower_name: user33
|
||||
name: user33
|
||||
login_name: user33
|
||||
full_name: User 33 (Limited Visibility)
|
||||
email: user33@example.com
|
||||
passwd_hash_algo: argon2
|
||||
passwd: a3d5fcd92bae586c2e3dbe72daea7a0d27833a8d0227aa1704f4bbd775c1f3b03535b76dd93b0d4d8d22a519dca47df1547b # password
|
||||
type: 0 # individual
|
||||
salt: ZogKvWdyEx
|
||||
is_admin: false
|
||||
visibility: 1
|
||||
avatar: avatar33
|
||||
avatar_email: user33@example.com
|
||||
num_repos: 0
|
||||
num_followers: 1
|
||||
num_following: 0
|
||||
is_active: true
|
||||
|
Reference in New Issue
Block a user