Conversation
57d28c6 to
39db0bf
Compare
…st primary group ID in search tests
…nality with new get_rid_set method
…xpiration before API call
… better error handling
Naksen
left a comment
There was a problem hiding this comment.
Опиши подробно механизмы:
- Выдачи нового RID
- Как глобальный пул делится на локальные пулы для каждого RID Set
- Как происходит обновление локального пула
| id: int = field(init=False) | ||
| name: str | ||
| is_system: bool = field(default=False) | ||
| object_sid: str = field(default="") |
There was a problem hiding this comment.
Почему здесь не убран object_sid ?
| def get_directory_sid(directory: Directory) -> str: # type: ignore | ||
| return directory.object_sid | ||
| def get_directory_sid(directory: Directory) -> str | None: # type: ignore | ||
| for attr in getattr(directory, "attributes", []): |
There was a problem hiding this comment.
Сделай property object_sid в классе Directory. Здесь получай его из директории: directory.object_sid.
| return string_to_sid(directory.object_sid) | ||
| def get_directory_sid(directory: Directory) -> bytes | None: | ||
| """Get objectSid as bytes from directory attributes.""" | ||
| for attr in directory.attributes: |
There was a problem hiding this comment.
Получать из property directory.object_sid
| """ | ||
| self._session = session | ||
|
|
||
| async def get_rid_available_pool(self, domain: Directory) -> int: |
| :param domain: Domain directory object | ||
| :return: QWORD value of rIDAvailablePool | ||
| """ | ||
| query = await self._session.scalar( |
There was a problem hiding this comment.
query -> rid_available_pool
| class RIDManagerSetupUseCase: | ||
| """RID Manager setup use case.""" | ||
|
|
||
| RID_SYSTEM_MIN = 1 |
There was a problem hiding this comment.
Это где всё используется кроме RID_USER_MIN ?
| from ldap_protocol.roles.ace_dao import AccessControlEntryDAO | ||
| from ldap_protocol.roles.role_use_case import RoleUseCase | ||
|
|
||
| RID_AVAILABLE_MAX = 1073741822 # 30-bit max (2^30 - 2) |
There was a problem hiding this comment.
Где логика деления глобального пула на пулы для каждого RID Set ?
There was a problem hiding this comment.
Где наследование прав доступа для rid_set_dir ?
| ) | ||
|
|
||
| next_rid = await self._gateway.get_next_rid(rid_set) | ||
| rid = next_rid + 1 |
There was a problem hiding this comment.
Где проверка на превышение пула ?
Задача: https://tracker.yandex.ru/MULTIDIRECTORY-1051
Добавлено:
Изменено: