コード例 #1
0
ファイル: Security.py プロジェクト: drxbate/M1
def createUser():
    try:
        rInfo=Registion.popRegistQueue()
        if rInfo==None:
            return True
        #{"username":username,"password":password,"info":info}
        cellphone = rInfo["username"]
        objectId=User.createUser(cellphone, rInfo["password"], rInfo["info"])
        code = SecurityModule.Registion.generateCode(cellphone)
        sms.send(cellphone, "[C.M.O]动态六位编码 %s"%code)
    except:
        print sys.exc_info()
    return True
コード例 #2
0
ファイル: User.py プロジェクト: drxbate/M1
 def createUser(self):
     objectid= User.createUser("13524157392", "123456")
     print objectid
     self.assertTrue(True, objectid)
     pass
コード例 #3
0
ファイル: accounts.py プロジェクト: drxbate/q2k
def main():
    objid = User.createUser("admin", "admin")
    Security.set_right(objid, [security.Role("admin",1)])