public function hasPermission($permission)
    {
        if ($permission instanceof Permission) {
            $permission = $permission->name;
        }
        return $this->getRoleSet()->has_permission($permission);
    }