Skip to content

Implement pagination support and refactor related tests#70

Merged
Creeper19472 merged 20 commits into
devfrom
feat-pagination
Jul 2, 2026
Merged

Implement pagination support and refactor related tests#70
Creeper19472 merged 20 commits into
devfrom
feat-pagination

Conversation

@Creeper19472

Copy link
Copy Markdown
Collaborator

No description provided.

… tests

- Added offset and cursor pagination support in keyring and audit log handlers.
- Introduced pagination schemas in a new pagination module.
- Updated tests to validate pagination functionality for user blocks, directories, groups, revisions, and search results.
- Refactored existing tests to align with new response structures, ensuring consistency across the application.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @Creeper19472, your pull request is larger than the review limit of 150000 diff characters

Comment thread src/alembic/versions/148e5acbbe5c_userblockentry_update.py Dismissed
Comment thread src/alembic/versions/148e5acbbe5c_userblockentry_update.py Dismissed
depends_on: Union[str, Sequence[str], None] = None
down_revision: str | Sequence[str] | None = 'e805605cbb30'
branch_labels: str | Sequence[str] | None = None
depends_on: str | Sequence[str] | None = None
down_revision: Union[str, Sequence[str], None] = 'a50674184a2c'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None
down_revision: str | Sequence[str] | None = 'a50674184a2c'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None
down_revision: str | Sequence[str] | None = 'a50674184a2c'
branch_labels: str | Sequence[str] | None = None
depends_on: Union[str, Sequence[str], None] = None
down_revision: str | Sequence[str] | None = 'a50674184a2c'
branch_labels: str | Sequence[str] | None = None
depends_on: str | Sequence[str] | None = None
down_revision: Union[str, Sequence[str], None] = '9c6ab2902b6e'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None
down_revision: str | Sequence[str] | None = '9c6ab2902b6e'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None
down_revision: str | Sequence[str] | None = '9c6ab2902b6e'
branch_labels: str | Sequence[str] | None = None
Comment thread src/alembic/versions/436b0d3452b6_feature_keyrings.py Fixed
Comment thread src/alembic/versions/4d21b1e591d3_add_search_indexes.py Fixed
… queries

- Enhanced the RequestSearchHandler to utilize new query functions for fetching search candidates.
- Introduced pagination and sorting improvements in search results.
- Added new SQLAlchemy queries for fetching directory and document listings with optimized filtering.
- Created new Alembic migration to add indexes for improved query performance on documents and folders.
- Updated tests to cover new search candidate fetching logic and pagination limits.
Comment thread tests/test_recycle_bin.py
try:
await authenticated_client.delete_directory(parent_id)
await authenticated_client.purge_directory(parent_id)
except Exception:
Comment thread tests/test_search.py
try:
await authenticated_client.delete_directory(folder_id)
await authenticated_client.purge_directory(folder_id)
except Exception:
- Added new tables for compiled access rules, groups, memberships, and rights in the database schema.
- Introduced logic for compiling access rules based on user permissions and group memberships.
- Enhanced the search functionality to filter out hidden candidates and respect access rules during search queries.
- Updated existing search tests to validate the new access control mechanisms and ensure proper visibility of search results based on user permissions.
- Refactored code to improve readability and maintainability, including the addition of helper functions for rule compilation and matching.
@Creeper19472 Creeper19472 changed the base branch from master to dev July 2, 2026 01:41
- Removed DocumentAccessRule and FolderAccessRule models in favor of a unified CompiledAccessRule system.
- Updated bulk purge functionality to eliminate references to DocumentAccessRule.
- Enhanced directory and document handlers to utilize new access rule functions for retrieving access rules.
- Implemented legacy access rule migration to compiled access rules during database upgrades.
- Adjusted tests to reflect changes in access rule handling and ensure compatibility with the new schema.
- Created a new Alembic migration to enforce the new compiled access rules structure and remove legacy tables.
…ncing integrity checks and legacy backup restoration
@Creeper19472 Creeper19472 merged commit 8de31c1 into dev Jul 2, 2026
5 checks passed
@Creeper19472 Creeper19472 deleted the feat-pagination branch July 2, 2026 06:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant