Skip to content

Баг с циклом в дереве групп #262

Closed

Description

@petrCher

Есть цепочка A → B → C. Редактируем A и ставим ей родителем C. Проверка смотрит только на прямых детей A, то есть на B. C там нет, проверка проходит. Получается кольцо A → B → C → A.

Дальше Group.parents идёт вверх бесконечно
Из parents вызывается indirect_scopes, из него User.scopes, а он дёргается при проверке прав.
Итог: любой запрос к сервису виснет

https://github.com/profcomff/auth-api/blob/main/auth_backend/routes/groups.py#L83

Activity

  1. moved this from Todo to In Progress in Viribus Teamon Aug 8, 2026
  2. linked a pull request that will close this issueBug fix tree cycle #266on Aug 14, 2026
  3. moved this from In Progress to Done in Viribus Teamon Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bug 🐞Что-то не работает

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions