-<?php namespace BookStack\Entities\Tools;
+<?php
+
+namespace BookStack\Entities\Tools;
use BookStack\Actions\ActivityType;
use BookStack\Auth\User;
class PermissionsUpdater
{
-
/**
* Update an entities permissions from a permission form submit request.
*/
}
if (!is_null($ownerId)) {
- $this->updateOwnerFromId($entity, $ownerId);
+ $this->updateOwnerFromId($entity, intval($ownerId));
}
$entity->save();
return collect($restrictions)->keys()->map(function ($action) use ($roleId) {
return [
'role_id' => $roleId,
- 'action' => strtolower($action),
- ] ;
+ 'action' => strtolower($action),
+ ];
});
});
}