Browse Source

changed to update only if owner and password given (cant update without owner due to email)

Natenom/support-murmur-13-1446181288462
Michael Ziegler 16 years ago
parent
commit
008f938d79
  1. 4
      pyweb/mumble/models.py

4
pyweb/mumble/models.py

@ -147,7 +147,7 @@ class Mumble( models.Model ):
class MumbleUser( models.Model ): class MumbleUser( models.Model ):
mumbleid = models.IntegerField( 'Mumble player_id', editable = False, default = -1 ); mumbleid = models.IntegerField( 'Mumble player_id', editable = False, default = -1 );
name = models.CharField( 'User name and Login', max_length = 200 ); name = models.CharField( 'User name and Login', max_length = 200 );
password = models.CharField( 'Login password', max_length = 200 );
password = models.CharField( 'Login password', max_length = 200, blank=True );
server = models.ForeignKey( Mumble ); server = models.ForeignKey( Mumble );
owner = models.ForeignKey( User, null=True, blank=True ); owner = models.ForeignKey( User, null=True, blank=True );
isAdmin = models.BooleanField( 'Admin on root channel', default = False ); isAdmin = models.BooleanField( 'Admin on root channel', default = False );
@ -168,7 +168,7 @@ class MumbleUser( models.Model ):
self.mumbleid = murmur.registerPlayer( dbus.String( self.name ) ); self.mumbleid = murmur.registerPlayer( dbus.String( self.name ) );
# Update user's registration # Update user's registration
if self.password:
if self.password and self.owner:
murmur.setRegistration( murmur.setRegistration(
dbus.Int32( self.mumbleid ), dbus.Int32( self.mumbleid ),
dbus.String( self.name ), dbus.String( self.name ),

Loading…
Cancel
Save