Browse Source

add EXT_authorize method to MumbleForm that checks for auth before sending/accepting data

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

3
pyweb/mumble/forms.py

@ -144,6 +144,9 @@ class MumbleForm( PropertyModelForm ):
model = Mumble
fields = ['name']
def EXT_authorize( self, request, action ):
return request.user.is_authenticated() and ( not self.instance or self.instance.isUserAdmin( request.user ) )
def EXT_validate( self, request ):
if not self.instance.isUserAdmin( request.user ):
return False

Loading…
Cancel
Save