mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28: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:
@@ -124,3 +124,15 @@
|
||||
repo_id: 24
|
||||
mode: 1
|
||||
|
||||
-
|
||||
id: 22
|
||||
user_id: 31
|
||||
repo_id: 27
|
||||
mode: 4
|
||||
|
||||
-
|
||||
id: 23
|
||||
user_id: 31
|
||||
repo_id: 28
|
||||
mode: 4
|
||||
|
||||
|
@@ -12,3 +12,8 @@
|
||||
id: 3
|
||||
user_id: 2
|
||||
follow_id: 8
|
||||
|
||||
-
|
||||
id: 4
|
||||
user_id: 31
|
||||
follow_id: 33
|
||||
|
@@ -69,3 +69,9 @@
|
||||
uid: 2
|
||||
org_id: 17
|
||||
is_public: true
|
||||
|
||||
-
|
||||
id: 13
|
||||
uid: 31
|
||||
org_id: 19
|
||||
is_public: true
|
||||
|
@@ -55,7 +55,7 @@
|
||||
name: Owners
|
||||
authorize: 4 # owner
|
||||
num_repos: 2
|
||||
num_members: 1
|
||||
num_members: 2
|
||||
can_create_org_repo: true
|
||||
|
||||
-
|
||||
|
@@ -87,3 +87,9 @@
|
||||
org_id: 17
|
||||
team_id: 9
|
||||
uid: 29
|
||||
|
||||
-
|
||||
id: 16
|
||||
org_id: 19
|
||||
team_id: 6
|
||||
uid: 31
|
||||
|
@@ -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