New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Public space is not displayed when guest user accesses "Space directory". #3704
Comments
Could not reproduce this issue, you probably have to rebuild the search index. http://docs.humhub.org/admin-search.html#index-rebuilding |
The search index was rebuilt, but public space is not visible to guest users. It is displayed without problems for the logged-in user. It may be a wrong fix, but if I set the |
Yes there is a public visibility (members only) and a public visibility (members and guests) this can be changed in the space security settigns |
@buddh4 |
@luke- , I can only imagin a search index issue? Any idea? |
@buddh4 I think the cause is the humhub\modules\space\components\ActiveQuerySpace visible (). |
@luke- there is space visibility_all missing in the visibility query? humhub/protected/humhub/modules/space/components/ActiveQuerySpace.php Lines 45 to 59 in d73ffac
Also if user is null space.visibility needs to be |
@luke- 0ffed46 is not compatible with Humhub1.3 for displaying results. In Humhub 1.3, the space Is it possible to include both |
I believe you'd have to use something like this Not tested }, Membership::findAll(['user_id' => $user->id]));
$this->andWhere(['OR',
['space.visibility' => 1],
['!=', 'space.visibility', Space::VISIBILITY_REGISTERED_ONLY && Space::VISIBILITY_ALL],
['IN', 'space.id', $spaceIds]
]);
} else {
$this->andWhere(['space.visibility' => 1]);
$this->andWhere(['space.visibility' => Space::VISIBILITY_REGISTERED_ONLY && Space::VISIBILITY_ALL]);
}
return $this;
} |
Should this be configurable, I'am not sure if its obvious that VISIBILITY_REGISTERED_ONLY spaces are visible for guests in the directory. But I see that this can be desirable in some cases. At least there should be a help text that this space will show up for guests in the directory. |
@luke- what do you think? |
What steps will reproduce the problem?
Administration -> Users-> Settings -> General -> Enable "Allow limited access for non-authenticated users (guests)"
Create a public space (VISIBILITY_ALL) that guests and registered users can access.
Access "Space directory" as a guest user. (Directory -> Spaces)
What is the expected result?
Public space is displayed.
What do you get instead?
Public space is not displayed.
Additional info
The text was updated successfully, but these errors were encountered: