user_management/api/views.py
def initial(self, request, *args, **kwargs):
        """Disallow users other than the user whose email is being reset."""
        email = request.data.get('email')
        if request.user.is_authenticated() and email != request.user.email:
            raise PermissionDenied()

        return super(ResendConfirmationEmail, self).initial(
            request,
            *args,
            **kwargs
        )
def initial(self, request, *args, **kwargs):
        email = request.data.get('email')
        if request.user.is_authenticated() and email != request.user.email:
            raise PermissionDenied()

        return super(ResendConfirmationEmail, self).initial(
            request,
            *args,
            **kwargs
        )
def initial ( self , request , * args , * * kwargs ) : email = request . data . get ( 'email' ) if request . user . is_authenticated ( ) and email != request . user . email : raise PermissionDenied ( ) return super ( ResendConfirmationEmail , self ) . initial ( request , * args , * * kwargs )
Disallow users other than the user whose email is being reset.
Disallow users other than the user whose email is being reset .