Removes all access rights for this user from the controller.
176107
async def revoke(self):
        
        await self.controller.revoke(self.username)
        self._user_info.access = ''
573536
public function clearRedundant()
    {
        Promocode::all()->each(function (Promocode $promocode) {
            if ($promocode->isExpired() || ($promocode->isDisposable() && $promocode->users()->exists())) {
                $promocode->users()->detach();
                $promocode->delete();
            }
        });
    }
242903
public function discard()
    {
        if ($this->isNew()) {
            $app = Facade::getFacadeApplication();
            $db = $app->make('database')->connection();
            // check for related version edits. This only gets applied when we edit global areas.
            $r = $db->executeQuery('select cRelationID, cvRelationID from CollectionVersionRelatedEdits where cID = ? and cvID = ?', array(
                $this->cID,
                $this->cvID,
            ));
            while ($row = $r->fetch()) {
                $cn = Page::getByID($row['cRelationID'], $row['cvRelationID']);
                $cnp = new Permissions($cn);
                if ($cnp->canApprovePageVersions()) {
                    $v = $cn->getVersionObject();
                    $v->delete();
                    $db->executeQuery('delete from CollectionVersionRelatedEdits where cID = ? and cvID = ? and cRelationID = ? and cvRelationID = ?', array(
                        $this->cID,
                        $this->cvID,
                        $row['cRelationID'],
                        $row['cvRelationID'],
                    ));
                }
            }
            $this->delete();
        }
        $this->refreshCache();
    }
576498
def drop_privileges ():
    """"""
    if os.name != 'posix':
        return
    if os.geteuid() == 0:
        log.warn(LOG_CHECK, _("Running as root user; "
                       "dropping privileges by changing user to nobody."))
        import pwd
        os.seteuid(pwd.getpwnam('nobody')[3])
528060
public static function clear()
    {
        $path = root().'resources/controllers/*.php';

        $files = File::glob($path);
        //
        foreach ($files as $file) {
            File::delete($file);
        }
        //
        return true;
    }
316028
def dispose(self):
        """"""
        self._username = None
        self._password = None
        self._org_url = None
        self._proxy_url = None
        self._proxy_port = None
        self._token_url = None
        self._securityHandler = None
        self._valid = None
        self._message = None

        del self._username
        del self._password
        del self._org_url
        del self._proxy_url
        del self._proxy_port
        del self._token_url
        del self._securityHandler
        del self._valid
        del self._message
538035
public function forAccessTokens()
    {
        $this->app->post('/token', $this->prefix('\Dusterio\LumenPassport\Http\Controllers\AccessTokenController@issueToken'));

        $this->app->group(['middleware' => ['auth']], function () {
            $this->app->get('/tokens', $this->prefix('AuthorizedAccessTokenController@forUser'));
            $this->app->delete('/tokens/{token_id}', $this->prefix('AuthorizedAccessTokenController@destroy'));
        });
    }
998050
private void clearAuthorizationTable() {
        userToAccessId.clear();
        groupToAccessId.clear();
        userToRoles.clear();
        groupToRoles.clear();
        specialSubjectToRoles.clear();
        accessIdToRoles.clear();
        explicitAccessIdToRoles.clear();
    }
1010645
public function clearIdentity()
    {
        if ($user = $this->getIdentity()) {
            $auth = $this->authenticationProvider->findByUserId($user->getId());
            $this->resetAuthenticationKey($auth);
        }

        $sp = session_get_cookie_params();
        foreach ([self::COOKIE_USER, self::COOKIE_VERIFY_A, self::COOKIE_VERIFY_B] as $cookieName) {
            setcookie($cookieName, null, null, '/', $sp['domain'], false, true);
        }

        $this->identity = null;
    }
1301440
public function down()
    {
        $table = config('laranixauth.password.table');

        $userKey = "{$table}_user_id_foreign";

        Schema::table($table, function (Blueprint $table) use ($userKey) {
            $table->dropForeign($userKey);
        });

        Schema::dropIfExists($table);
    }
662583
public function revokeAllPrivileges()
    {
        if ($this->revokeAllStatement == null) {
            $this->revokeAllStatement =
                $this->connection->prepare("DELETE FROM UserPrivileges WHERE username = ?");
            $u = $this->user->getUsername();
            $this->revokeAllStatement->bindParam(1, $u);
        }
        $this->revokeAllStatement->execute();
        $this->rootPrivilege = $this->sitePrivilege = 0;
        $this->pagePrivilege = array();
    }
1055641
def clean(self, user=None):
        """"""
        doc = self._resource
        internal_fields = deepcopy(self.internal_fields)
        if user is None or not user.is_user(self.organisation_id):
            internal_fields.append('permissions')

        result = {k: v for k, v in doc.iteritems() if k not in internal_fields}

        return result
378065
public function clearPermissionAssignment()
    {
        $app = Application::getFacadeApplication();
        $db = $app->make(Connection::class);
        $db->executeQuery('update PagePermissionAssignments set paID = 0 where pkID = ? and cID = ?', [$this->pk->getPermissionKeyID(), $this->getPermissionObject()->getPermissionsCollectionID()]);

        $cache = $app->make('cache/request');
        $identifier = sprintf(
            'permission/assignment/access/%s/%s',
            $this->pk->getPermissionKeyHandle(),
            $this->getPermissionObject()->getPermissionObjectIdentifier()
        );
        $cache->delete($identifier);
    }
869034
public function userExit()
  {
    if (isset($_SESSION['auth'])) {
      $load_session = R::findOne('authorization', 'token = ?', array($_SESSION['auth']['token']));

      if ($load_session) {
        R::trash($load_session);
      }
    }

    unset($_SESSION['auth']);

    if (isset($_COOKIE['auth'])) {
      setcookie('auth','', time() - 3600 * 24 * 7);
      ob_end_flush();
    }

    redirect('/');
  }
837058
public void removePermissions(String identity)
   {
      for (Iterator<AccessControlEntry> iter = accessList.iterator(); iter.hasNext();)
      {
         AccessControlEntry a = iter.next();
         if (a.getIdentity().equals(identity))
            iter.remove();
      }
   }
801224
public function down()
    {
        $adminRole = RoleProxy::where(['name' => 'admin'])->first();
        if ($adminRole) {
            $adminRole->revokePermissionTo(
                ResourcePermissions::allPermissionsFor('setting')
            );
        }

        ResourcePermissions::deletePermissionsForResource('setting');
    }
765467
public function down()
    {
        $tableNames = config('permission.table_names');

        Schema::drop($tableNames['role_has_permissions']);
        Schema::drop($tableNames['model_has_roles']);
        Schema::drop($tableNames['model_has_permissions']);
        Schema::drop($tableNames['roles']);
        Schema::drop($tableNames['permissions']);
    }