mirror of
https://github.com/humhub/humhub.git
synced 2025-03-14 20:19:47 +01:00
Merge pull request #2662 from githubjeka/patch-1
Update MembershipController:search
This commit is contained in:
commit
efe69863de
@ -50,8 +50,10 @@ class MembershipController extends \humhub\modules\content\components\ContentCon
|
||||
Yii::$app->response->format = 'json';
|
||||
|
||||
$space = $this->getSpace();
|
||||
|
||||
if (!$space->isMember()) {
|
||||
$visibility = (int)$space->visibility;
|
||||
if ($visibility === Space::VISIBILITY_NONE && !$space->isMember() ||
|
||||
($visibility === Space::VISIBILITY_REGISTERED_ONLY && Yii::$app->user->isGuest)
|
||||
) {
|
||||
throw new HttpException(404, Yii::t('SpaceModule.controllers_SpaceController', 'This action is only available for workspace members!'));
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user