BookStack\Http\Controllers\Controller::checkPermission PHP 메소드

checkPermission() 보호된 메소드

Checks for a permission.
protected checkPermission ( string $permissionName ) : boolean | Illuminate\Http\RedirectResponse
$permissionName string
리턴 boolean | Illuminate\Http\RedirectResponse
    protected function checkPermission($permissionName)
    {
        if (!user() || !user()->can($permissionName)) {
            $this->showPermissionError();
        }
        return true;
    }