mirror of
https://github.com/humhub/humhub.git
synced 2025-01-17 22:28:51 +01:00
Fix #3873: Invalid visibility handling in Content::canView()
for private global content
This commit is contained in:
parent
e4a358b308
commit
4320e4764c
@ -8,4 +8,4 @@ HumHub Change Log (DEVELOP)
|
||||
- Enh #3858: Support SameSite cookies
|
||||
- Fix #3861: Improved warning details when auto delete inconsistent notification
|
||||
- Enh: Added gradient to `ui.showMore` feature
|
||||
- Enh:
|
||||
- Fix #3873: Invalid visibility handling in `Content::canView()` for private global content
|
||||
|
@ -749,7 +749,12 @@ class Content extends ActiveRecord implements Movable, ContentOwner
|
||||
$user = User::findOne(['id' => $user]);
|
||||
}
|
||||
|
||||
// User cann access own content
|
||||
// Check global content visibility, private global content is visible for all users
|
||||
if(empty($this->contentcontainer_id) && !Yii::$app->user->isGuest) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// User can access own content
|
||||
if ($user !== null && $this->created_by == $user->id) {
|
||||
return true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user