huskar_api/api/auth.py
def delete(self, application_name):
        """Dismisses an user from specified authority of current application.

        :param application_name: The name of application.
        :form authority: The authority name, ``read`` or ``write``.
        :form username: The username of dismissing one.
        :<header Authorization: Huskar Token (See :ref:`token`)
        :status 404: The application with specified name is not found.
        :status 200: The authority is dismissed.
        """
        authority = request.form['authority'].strip()
        user = self._get_user_or_400(request.form['username'].strip())
        application = self._get_application_or_404(application_name)
        with audit_log(audit_log.types.DISMISS_APPLICATION_AUTH,
                       user=user, application=application,
                       authority=authority):
            self._delete_application_auth(application, user, authority)
        if (not (user and user.is_admin) and
                user.email):
            deliver_email_safe(EmailTemplate.PERMISSION_DISMISS, user.email, {
                'username': user.username,
                'application_name': application.application_name,
                'authority': authority,
            })
        return api_response()
Dismisses an user from specified authority of current application.

        :param application_name: The name of application.
        :form authority: The authority name, ``read`` or ``write``.
        :form username: The username of dismissing one.
        :<header Authorization: Huskar Token (See :ref:`token`)
        :status 404: The application with specified name is not found.
        :status 200: The authority is dismissed.
        
Dismisses an user from specified authority of current application.
Dismisses an user from specified authority of current application .
def delete(self, application_name):
        authority = request.form['authority'].strip()
        user = self._get_user_or_400(request.form['username'].strip())
        application = self._get_application_or_404(application_name)
        with audit_log(audit_log.types.DISMISS_APPLICATION_AUTH,
                       user=user, application=application,
                       authority=authority):
            self._delete_application_auth(application, user, authority)
        if (not (user and user.is_admin) and
                user.email):
            deliver_email_safe(EmailTemplate.PERMISSION_DISMISS, user.email, {
                'username': user.username,
                'application_name': application.application_name,
                'authority': authority,
            })
        return api_response()
def delete ( self , application_name ) : authority = request . form [ 'authority' ] . strip ( ) user = self . _get_user_or_400 ( request . form [ 'username' ] . strip ( ) ) application = self . _get_application_or_404 ( application_name ) with audit_log ( audit_log . types . DISMISS_APPLICATION_AUTH , user = user , application = application , authority = authority ) : self . _delete_application_auth ( application , user , authority ) if ( not ( user and user . is_admin ) and user . email ) : deliver_email_safe ( EmailTemplate . PERMISSION_DISMISS , user . email , { 'username' : user . username , 'application_name' : application . application_name , 'authority' : authority , } ) return api_response ( )
Dismisses an user from specified authority of current application.
Dismisses an user from specified authority of current application .
"""Dismisses an user from specified authority of current application.

        :param application_name: The name of application.
        :form authority: The authority name, ``read`` or ``write``.
        :form username: The username of dismissing one.
        :<header Authorization: Huskar Token (See :ref:`token`)
        :status 404: The application with specified name is not found.
        :status 200: The authority is dismissed.
        """
self
application_name
The name of application.
The name of application .
form
The authority name, ``read`` or ``write``.
The authority name ` ` read ` ` or ` ` write ` ` .
form
The username of dismissing one.
The username of dismissing one .
<header
Huskar Token (See :ref:`token`)
Huskar Token ( See : ref : ` token ` )
status
The application with specified name is not found.
The application with specified name is not found .
status
The authority is dismissed.
The authority is dismissed .