Delete a submitted credential
17842
protected function submitDeleteCredential()
    {
        if ($this->isPosted('delete') && isset($this->data_credential['credential_id'])) {

            $this->controlAccess('module_gapi_credential_delete');

            if ($this->credential->callHandler($this->data_credential['type'], 'delete', array(
                $this->data_credential['credential_id']))) {
                $this->redirect('admin/report/gapi', $this->text('Credential has been deleted'), 'success');
            }

            $this->redirect('', $this->text('Credential has not been deleted'), 'warning');
        }
    }
1261315
def deleteCertificate(self, certName):
        

        params = {"f" : "json"}
        url = self._url + "/sslCertificates/{cert}/delete".format(
            cert=certName)
        return self._post(url=url, param_dict=params,
                          proxy_port=self._proxy_port,
                          proxy_url=self._proxy_url)
1268973
def delete!(creds = {}, section = "file", reason = "because")
      BlipTV::ApiSpec.check_attributes('videos.delete', creds)
      
      reason = reason.gsub(" ", "%20") # TODO write a method to handle this and other illegalities of URL
      
      if creds[:username] && !creds[:userlogin]
        creds[:userlogin] = creds[:username]
      end
      
      url, path = "www.blip.tv", "/?userlogin=#{creds[:userlogin]}&password=#{creds[:password]}&cmd=delete&s=file&id=#{@id}&reason=#{reason}&skin=api"
      request = Net::HTTP.get(url, path)
      hash = Hash.from_xml(request)
      make_sure_video_was_deleted(hash)
    end
827357
def deleteinputfile(project, filename, credentials=None):
        """"""

        user, oauth_access_token = parsecredentials(credentials) #pylint: disable=unused-variable
        filename = filename.replace("..","") #Simple security

        if len(filename) == 0:
            #Deleting all input files
            shutil.rmtree(Project.path(project, user) + 'input')
            os.makedirs(Project.path(project, user) + 'input') #re-add new input directory
            return "Deleted" #200
        elif os.path.isdir(Project.path(project, user) + filename):
            #Deleting specified directory
            shutil.rmtree(Project.path(project, user) + filename)
            return "Deleted" #200
        else:
            try:
                file = clam.common.data.CLAMInputFile(Project.path(project, user), filename)
            except:
                raise flask.abort(404)

            success = file.delete()
            if not success:
                raise flask.abort(404)
            else:
                msg = "Deleted"
                return withheaders(flask.make_response(msg),'text/plain', {'Content-Length': len(msg), 'allow_origin': settings.ALLOW_ORIGIN})
18749
protected function actionListCredential()
    {
        list($selected, $action) = $this->getPostedAction();

        $deleted = 0;

        foreach ($selected as $id) {
            if ($action === 'delete' && $this->access('module_gapi_credential_delete')) {
                $credential = $this->credential->get($id);
                $deleted += (int) $this->credential->callHandler($credential['type'], 'delete', array(
                    $credential['credential_id']));
            }
        }

        if ($deleted > 0) {
            $message = $this->text('Deleted %num item(s)', array('%num' => $deleted));
            $this->setMessage($message, 'success');
        }
    }
996194
def delete_custom_service_account(self, account, nickname, password):
        
        return self.post(
            url="https://api.weixin.qq.com/customservice/kfaccount/del",
            data={
                "kf_account": account,
                "nickname": nickname,
                "password": password
            }
        )
1354650
@DELETE
    @Produces({MediaType.TEXT_HTML, MediaType.APPLICATION_JSON})
    @Path("/{name}")
    public Response delete(@Auth final DbCredential credential, @PathParam("name") final String name){
        if(!credential.getRoles().contains(AvailableRoles.DATA_DELETER)){
            throw new WebApplicationException(Response.status(Response.Status.UNAUTHORIZED).build());
        }

        LOG.info("Got a delete license request.");
        getLicenseHandler().deleteLicense(name);
        cacheUtils.clear(CacheName.PROMOTION_REPORTS);
        return Response.ok("done").build();
    }
566553
def wipe_task(self, courseid, taskid):
        
        submissions = self.database.submissions.find({"courseid": courseid, "taskid": taskid})
        for submission in submissions:
            for key in ["input", "archive"]:
                if key in submission and type(submission[key]) == bson.objectid.ObjectId:
                    self.submission_manager.get_gridfs().delete(submission[key])

        self.database.aggregations.remove({"courseid": courseid, "taskid": taskid})
        self.database.user_tasks.remove({"courseid": courseid, "taskid": taskid})
        self.database.submissions.remove({"courseid": courseid, "taskid": taskid})

        self._logger.info("Task %s/%s wiped.", courseid, taskid)
1030196
def deleteoutputfile(project, filename, credentials=None):
        """"""

        user, oauth_access_token = parsecredentials(credentials) #pylint: disable=unused-variable
        if filename: filename = filename.replace("..","") #Simple security

        if not filename or len(filename) == 0:
            #Deleting all output files and resetting
            Project.reset(project, user)
            msg = "Deleted"
            return withheaders(flask.make_response(msg), 'text/plain',{'Content-Length':len(msg), 'allow_origin': settings.ALLOW_ORIGIN}) #200
        elif os.path.isdir(Project.path(project, user) + filename):
            #Deleting specified directory
            shutil.rmtree(Project.path(project, user) + filename)
            msg = "Deleted"
            return withheaders(flask.make_response(msg), 'text/plain',{'Content-Length':len(msg), 'allow_origin': settings.ALLOW_ORIGIN}) #200
        else:
            try:
                file = clam.common.data.CLAMOutputFile(Project.path(project, user), filename)
            except:
                raise flask.abort(404)

            success = file.delete()
            if not success:
                raise flask.abort(404)
            else:
                msg = "Deleted"
                return withheaders(flask.make_response(msg), 'text/plain',{'Content-Length':len(msg), 'allow_origin': settings.ALLOW_ORIGIN})
1075297
def clear_validation(self, cert):
        

        if cert.signature in self._validate_map:
            del self._validate_map[cert.signature]
1288841
def delete(config, username, type):
        """"""
        client = Client()
        client.prepare_connection()
        user_api = API(client)
        user_api.delete(username, type)
129291
public function delete()
    {
        $app = Application::getFacadeApplication();
        $db = $app->make(Connection::class);
        $db->executeQuery('delete from PermissionKeys where pkID = ?', [$this->getPermissionKeyID()]);
        self::loadAll();
    }
1078247
public void clearCredential(String userId) throws AuthException {
        try {
            authorizationCodeFlow.getCredentialDataStore().delete(userId);
        } catch (IOException e) {
            throw new AuthException("Unable to clear credential.", e);
        }
    }
278339
def delete_server_cert(cert_name, region=None, key=None, keyid=None, profile=None):
    '''
    
    '''
    conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
    try:
        return conn.delete_server_cert(cert_name)
    except boto.exception.BotoServerError as e:
        log.debug(e)
        log.error('Failed to delete certificate %s.', cert_name)
        return False
1194894
def delete(self) :
        """"""
        if not self.URL :
            raise CreationError("Please save user first", None, None)

        r = self.connection.session.delete(self.URL)
        if r.status_code < 200 or r.status_code > 202 :
            raise DeletionError("Unable to delete user, url: %s, status: %s" %(r.url, r.status_code), r.content )

        self.URL = None
1029193
def credential_delete_simulate(self, *ids):
        
        return self.raw_query("credential", "deleteSimulate", data={
            "credentials": [{"id": str(id)} for id in ids]
        })
908093
private function zRemovePemFiles()
    {
        if (is_file($this->pubKeyFile)) {
            unlink($this->pubKeyFile);
        }
        if (is_file($this->priKeyFile)) {
            unlink($this->priKeyFile);
        }
        if (is_file($this->certKeyFile)) {
            unlink($this->certKeyFile);
        }
    }