mirror of
https://github.com/openvk/openvk
synced 2024-11-11 01:19:53 +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())
|
if($album->getPrettyId() !== $owner . "_" . $id || $album->isDeleted())
|
||||||
$this->notFound();
|
$this->notFound();
|
||||||
|
|
||||||
if($owner > 0 /* bc we currently don't have perms for clubs */) $ownerObject = (new Users)->get($owner);
|
if($owner > 0 /* bc we currently don't have perms for clubs */) {
|
||||||
if(!$ownerObject->getPrivacyPermission('photos.read', $this->user->identity ?? NULL))
|
$ownerObject = (new Users)->get($owner);
|
||||||
$this->flashFail("err", tr("forbidden"), tr("forbidden_comment"));
|
if(!$ownerObject->getPrivacyPermission('photos.read', $this->user->identity ?? NULL))
|
||||||
|
$this->flashFail("err", tr("forbidden"), tr("forbidden_comment"));
|
||||||
|
}
|
||||||
|
|
||||||
$this->template->album = $album;
|
$this->template->album = $album;
|
||||||
$this->template->photos = iterator_to_array( $album->getPhotos( (int) ($this->queryParam("p") ?? 1) ) );
|
$this->template->photos = iterator_to_array( $album->getPhotos( (int) ($this->queryParam("p") ?? 1) ) );
|
||||||
|
|
Loading…
Reference in a new issue