BookStack\Http\Controllers\Controller::checkOwnablePermission PHP Method

checkOwnablePermission() protected method

Check the current user's permissions against an ownable item.
protected checkOwnablePermission ( $permission, Ownable $ownable ) : boolean
$permission
$ownable BookStack\Ownable
return boolean
    protected function checkOwnablePermission($permission, Ownable $ownable)
    {
        if (userCan($permission, $ownable)) {
            return true;
        }
        return $this->showPermissionError();
    }