Fix: migrations downgrade config, mapping error, schema paginator not case sensitive#980
Merged
rimu-stack merged 4 commits intodevfrom Apr 10, 2026
Merged
Fix: migrations downgrade config, mapping error, schema paginator not case sensitive#980rimu-stack merged 4 commits intodevfrom
rimu-stack merged 4 commits intodevfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates LDAP schema APIs and tooling to support database downgrades via the app CLI, improves schema list searching to be case-insensitive, extends error mapping for unauthorized access, and fixes a legacy attribute type DTO mapping.
Changes:
- Add
--downgrade REVCLI command (and update Makefile targets to use it) for database rollback. - Make schema paginator search case-insensitive for objectClasses and attributeTypes + add tests.
- Map
UnauthorizedErrorto HTTP 401 for the LDAP schema API; fix legacy attribute typenamemapping.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/test_api/test_ldap_schema/test_object_class_router.py | Adds test ensuring object class pagination search is case-insensitive. |
| tests/test_api/test_ldap_schema/test_attribute_type_router.py | Adds test ensuring attribute type pagination search is case-insensitive. |
| Makefile | Switches migration rerun commands to use the new app --downgrade flag. |
| app/multidirectory.py | Adds --downgrade CLI option and routes it to Alembic downgrade. |
| app/ldap_protocol/ldap_schema/object_class/object_class_dao.py | Changes paginator query filtering to use ilike for case-insensitive search. |
| app/ldap_protocol/ldap_schema/attribute_type/attribute_type_dao.py | Changes paginator query filtering to use ilike for case-insensitive search. |
| app/ldap_protocol/ldap_schema/_legacy/attribute_type/attribute_type_dao.py | Fixes legacy DTO conversion to set name from the model name. |
| app/api/ldap_schema/init.py | Adds UnauthorizedError -> 401 mapping for schema routes. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
| postgresql_using="hash", | ||
| ), | ||
| Index("idx_Directory_name_hash", "name", postgresql_using="hash"), | ||
| Index("idx_Directory_name_gin_trgm", "name", postgresql_using="gin"), |
| "Directory", | ||
| [sa.literal_column("name gin_trgm_ops")], | ||
| unique=False, | ||
| postgresql_using="gin", |
Naksen
approved these changes
Apr 10, 2026
rimu-stack
approved these changes
Apr 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Часть правок связаны с задачей 1258
name