mirror of
https://github.com/openvk/openvk
synced 2024-11-13 10:39:24 +03:00
Photos: Fix unexisting permissions for clubs photo album
This commit is contained in:
parent
cd91d4e310
commit
e32aba2fd3
1 changed files with 5 additions and 3 deletions
|
@ -131,9 +131,11 @@ final class PhotosPresenter extends OpenVKPresenter
|
|||
if($album->getPrettyId() !== $owner . "_" . $id || $album->isDeleted())
|
||||
$this->notFound();
|
||||
|
||||
if($owner > 0 /* bc we currently don't have perms for clubs */) $ownerObject = (new Users)->get($owner);
|
||||
if(!$ownerObject->getPrivacyPermission('photos.read', $this->user->identity ?? NULL))
|
||||
$this->flashFail("err", tr("forbidden"), tr("forbidden_comment"));
|
||||
if($owner > 0 /* bc we currently don't have perms for clubs */) {
|
||||
$ownerObject = (new Users)->get($owner);
|
||||
if(!$ownerObject->getPrivacyPermission('photos.read', $this->user->identity ?? NULL))
|
||||
$this->flashFail("err", tr("forbidden"), tr("forbidden_comment"));
|
||||
}
|
||||
|
||||
$this->template->album = $album;
|
||||
$this->template->photos = iterator_to_array( $album->getPhotos( (int) ($this->queryParam("p") ?? 1) ) );
|
||||
|
|
Loading…
Reference in a new issue