Support Center
Changes a user's approval_status to 'rejected'. A rejected user may not log in until he or she is approved. It is not an error to reject an already rejected user.
Only super-users may approve or reject other users.
reject_user(self, cid, user_id, current_ust, current_app, remote_addr)
cid
: Correlation ID used by audit loguser_id
: ID of the user to approvecurrent_ust
: Current user's UST - must belong to a super-usercurrent_app
: Name of application the current user is issuing the call fromremote_addr
: User's remote addressReturns
: (None)# -*- coding: utf-8 -*-
# Zato
from zato.server.service import Service
class RejectUser(Service):
def handle(self):
# Request metadata
current_ust = 'gAAAAABanYYUAaBcsIn6OKhpW9ia6CdflCG7AE_m7...'
current_app = 'CRM'
remote_addr = '127.0.0.1'
# User to approve
user_id = 'zusrzw764rvcr84vtcb3ctyha5cbe'
self.sso.user.approve_user(self.cid, data, current_ust, current_app, remote_addr)