We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 56716f5 commit a3e5231Copy full SHA for a3e5231
models/organization/org.go
@@ -448,8 +448,9 @@ func CountOrgs(opts FindOrgOptions) (int64, error) {
448
449
// HasOrgOrUserVisible tells if the given user can see the given org or user
450
func HasOrgOrUserVisible(ctx context.Context, orgOrUser, user *user_model.User) bool {
451
- // Not SignedUser
452
- if user == nil {
+ // If user is nil, it's an anonymous user/request.
+ // The Ghost user is handled like an anonymous user.
453
+ if user == nil || user.IsGhost() {
454
return orgOrUser.Visibility == structs.VisibleTypePublic
455
}
456
0 commit comments