ЕСОЗ - публічна документація

Auth.Revoke role from users

Get users by party_id

Search users in auth.users by {party_id} and {legal_entity_id}

WHERE AUTH.users.party_id = :party_id
  AND AUTH.user_roles.client_id = :client_id
  AND AUTH.users.id = AUTH.user_roles.user_id

If no users found - return error USERS_NOT_FOUND

Revoke role from users

Delete entities from auth.user_roles, where:

Parameter

Source

AUTH.user_roles.user_id

:user_id

AUTH.user_roles.role_id

role_by_name(:employee_type)

AUTH.user_roles.client_id

:client_id

Remove all approvals by client_id

Destroy all tokens by client_id

ЕСОЗ - публічна документація