Artesaos\Defender\Traits\HasDefender::canDo PHP Method

canDo() public method

Checks for permission If has superuser group automatically passes.
public canDo ( string $permission, boolean $force = false ) : boolean
$permission string
$force boolean
return boolean
    public function canDo($permission, $force = false)
    {
        // If has superuser role
        if ($this->isSuperUser()) {
            return true;
        }
        return $this->hasPermission($permission, $force);
    }