Beispiel #1
0
 def addPlayersAsIdentities(self):
     """Add all players with passwords as identities.
     """
     for th in self.__ids.values():
         if isinstance(th, player.Player) and hasattr(th, 'password'):
             styles.requireUpgrade(th)
             idname = th.name
             print "Adding identity %s" % idname
             ident = passport.Identity(idname, self.application)
             ident.setAlreadyHashedPassword(th.password)
             ident.addKeyForPerspective(th)
             try:
                 self.application.authorizer.addIdentity(ident)
             except KeyError:
                 print 'unable to add reality identity for %s' % idname
Beispiel #2
0
 def addPlayersAsIdentities(self):
     """Add all players with passwords as identities.
     """
     for th in self.__ids.values():
         if isinstance(th, player.Player) and hasattr(th, 'password'):
             styles.requireUpgrade(th)
             idname = th.name
             print "Adding identity %s" % idname
             ident = passport.Identity(idname, self.application)
             ident.setAlreadyHashedPassword(th.password)
             ident.addKeyForPerspective(th)
             try:
                 self.application.authorizer.addIdentity(ident)
             except KeyError:
                 print 'unable to add reality identity for %s' % idname
Beispiel #3
0
 def upgradeToVersion1(self):
     from twisted.internet.app import theApplication
     styles.requireUpgrade(theApplication)
     pb.Service.__init__(self, 'twisted.words', theApplication)
Beispiel #4
0
 def upgradeToVersion1(self):
     print 'Upgrading Twisted Reality instance.'
     from twisted.internet.app import theApplication
     styles.requireUpgrade(theApplication)
     pb.Service.__init__(self, 'twisted.reality', theApplication)
     self.addPlayersAsIdentities()
Beispiel #5
0
 def upgradeToVersion1(self):
     print 'Upgrading Twisted Reality instance.'
     from twisted.internet.app import theApplication
     styles.requireUpgrade(theApplication)
     pb.Service.__init__(self, 'twisted.reality', theApplication)
     self.addPlayersAsIdentities()
Beispiel #6
0
 def upgradeToVersion1(self):
     from twisted.internet.app import theApplication
     styles.requireUpgrade(theApplication)
     pb.Service.__init__(self, 'twisted.words', theApplication)