Browse Source

fix linkform authentication to correctly recognize empty self.instance

Natenom/support-murmur-13-1446181288462
Michael Ziegler 15 years ago
parent
commit
a6faf66e4d
  1. 2
      pyweb/mumble/forms.py

2
pyweb/mumble/forms.py

@ -308,7 +308,7 @@ class MumbleUserLinkForm( MumbleUserForm ):
def EXT_authorize( self, request, action ): def EXT_authorize( self, request, action ):
if not request.user.is_authenticated(): if not request.user.is_authenticated():
return False return False
if self.instance is not None and request.user != self.instance.owner:
if self.instance.id is not None and request.user != self.instance.owner:
# editing another account # editing another account
return False return False
return settings.ALLOW_ACCOUNT_LINKING return settings.ALLOW_ACCOUNT_LINKING

Loading…
Cancel
Save