-
Notifications
You must be signed in to change notification settings - Fork 1
Добавил при отвязке метода входа удаление юзердаты #234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| if cls.get_scope() not in (s.name for s in request_user.scopes) and request_user.id != user_id: | ||
| if cls.get_scope() not in (s.name for s in request_user.scopes) and request_user.user_id != user_id: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
а ты проверял, что там реально так нужно? странно что не просто id
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
да, там в структуре у request_user поле id это просто обычный айдишник, который ничего не значит, а user_id отдельное поле связанное с таблицей юзера. Плюс я это протестил и работает только мой вариант

Изменения
При отвязке метода входа отправляется запрос в кафку, который потом обрабатывается в userdata-api
Детали реализации
Для отвязки метода входа передаю значение value=None в кафку, также исправил ошибку, исправив request_user.id != user_id на request_user.user_id != user_id (исходя из структуры реквест юзера).
Check-List
blackиisortдля Back-End илиPrettierдля Front-End?