VKAPI: Remove the ability for those who are not group administrators to publish posts on behalf of the group

This commit is contained in:
Maxim Leshchenko 2022-01-15 17:51:04 +02:00
parent 5d62934053
commit a81e9ac704
No known key found for this signature in database
GPG key ID: BB9C44A8733FBEEE

View file

@ -142,7 +142,7 @@ final class Wall extends VKAPIRequestHandler
}
$flags = 0;
if($from_group == 1)
if($from_group == 1 && $wallOwner instanceof Club && $wallOwner->canBeModifiedBy($this->getUser()))
$flags |= 0b10000000;
if($signed == 1)
$flags |= 0b01000000;