ObjectAuthorization: Gracefully handle incomplete objects in grantsOn()

This commit is contained in:
Johannes Meyer 2022-08-24 16:15:04 +02:00
parent 7ed4570a31
commit 73a95e055b

View file

@ -44,6 +44,10 @@ class ObjectAuthorization
$tableName = $for->getTableName();
$uniqueId = $for->{$for->getKeyName()};
if (! isset($uniqueId)) {
return false;
}
if (! isset(self::$knownGrants[$tableName][$uniqueId])) {
$self->loadGrants(
get_class($for),