Logo Search packages:      
Sourcecode: jabber-irc version File versions  Download package

def jep0133::Delete_User_Command::cmdFirstStage (   self,
  conn,
  request 
)

Set the session ID, and return the form containing the user's jid

Definition at line 109 of file jep0133.py.

00109                                         :
        """Set the session ID, and return the form containing the user's jid"""
        if request.getFrom().getStripped() in config.admins:
           # Setup session ready for form reply
           session = self.getSessionID()
           self.sessions[session] = {'jid':request.getFrom(),'actions':{'cancel':self.cmdCancel,'next':self.cmdSecondStage,'execute':self.cmdSecondStage}}
           # Setup form with existing data in
           reply = request.buildReply('result')
           form = DataForm(title='Deleting a User',data=['Fill out this form to delete a user', DataField(typ='hidden',name='FORM_TYPE',value=NS_ADMIN),DataField(desc='The Jabber ID for the account to be deleted', typ='jid-single', name='accountjid')])
           replypayload = [Node('actions',attrs={'execute':'next'},payload=[Node('next')]),form]
           reply.addChild(name='command',namespace=NS_COMMANDS,attrs={'node':request.getTagAttr('command','node'),'sessionid':session,'status':'executing'},payload=replypayload)
           self._owner.send(reply)
        else:
           self._owner.send(Error(request,ERR_FORBIDDEN))
        raise NodeProcessed

    def cmdSecondStage(self,conn,request):


Generated by  Doxygen 1.6.0   Back to index