We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 43ab932 commit 88d5275Copy full SHA for 88d5275
models/organization/org.go
@@ -458,8 +458,9 @@ func CountOrgs(opts FindOrgOptions) (int64, error) {
458
459
// HasOrgOrUserVisible tells if the given user can see the given org or user
460
func HasOrgOrUserVisible(ctx context.Context, orgOrUser, user *user_model.User) bool {
461
- // Not SignedUser
462
- if user == nil {
+ // If user is nil, it's an anonymous user/request.
+ // The Ghost user is handled like an anonymous user.
463
+ if user == nil || user.IsGhost() {
464
return orgOrUser.Visibility == structs.VisibleTypePublic
465
}
466
0 commit comments