Skip to content
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

[AAE-22377] Implemented max items limit per request #1440

Closed

Conversation

RCorsaletti
Copy link
Contributor

STILL WP need parameters for max and enabled/disabled

Comment on lines 33 to 34
private static final int MAX_ITEMS_LIMIT = 1000; // add parameter
private static final boolean MAX_ITEMS_LIMIT_ENABLED = true; // add parameter
Copy link
Member

Choose a reason for hiding this comment

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

Are these comments needed?

Copy link
Member

@erdemedeiros erdemedeiros left a comment

Choose a reason for hiding this comment

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

Hello, I think this change is going to be confusing for end users. Let's discuss about it.

Comment on lines 33 to 34
private static final int MAX_ITEMS_LIMIT = 1000; // add parameter
private static final boolean MAX_ITEMS_LIMIT_ENABLED = true; // add parameter
Copy link
Member

Choose a reason for hiding this comment

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

I think both values should use system properties, so that they can be overridden if needed. I'd also use false as default value for MAX_ITEMS_LIMIT_ENABLED.

Comment on lines 70 to 71
Pageable limitedPageable = PageRequest.of(0, MAX_ITEMS_LIMIT);
return new AlfrescoPageRequest(MAX_ITEMS_LIMIT + 1L, MAX_ITEMS_LIMIT, limitedPageable);
Copy link
Member

Choose a reason for hiding this comment

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

IMO, silently changing the values provided via query param sounds confusing to me and I think people will report bugs for this. Maybe it's better to raise an exception in this case.

@RCorsaletti RCorsaletti marked this pull request as ready for review May 14, 2024 10:34
alfresco-build and others added 6 commits May 22, 2024 22:55
…e task search query performance (#1441)

* AAE-22075 Wip initial commit

* WIP

* AAE-22075 Wip fixed failing test

* AAE-22075 reproduce error. ("spring.jpa.properties.hibernate.enable_lazy_load_no_trans=true", if set to false, exception is raised)

* AAE-22075 reproduce exact situation of issue

* AAE-22075 tentative with DSL filters

* Revert "AAE-22075 tentative with DSL filters"

This reverts commit 6a148ac.

* AAE-22075 test with entity graph

* AAE-18428 Fix Swagger API suggest to use the HAL-JSON format (#1306)

* AAE-21097 Implement permission-based authorization (#1427)

* AAE-21097 add permission getter on Jwt adapter, implement conversion to granted authority and include permissions in auth flow

* AAE-21097 add AuthorizationConfigurerIT, fix omitted methods logic

* AAE-21097 fix tests

* AAE-21097 add license header

* AAE-21097 remove unused import

* AAE-21097 CustomAuthorizationManager implemented with different authority types for role and permission

* AAE-21097 move CustomAuthorizationManager

* AAE-21097 license header

* AAE-22123 Fix NPE when getting permissions (#1431)

* AAE-22123 added key check in KeycloakResourceJwtAdapter

* AAE-22123 change test

* chore(deps): upgrade Activiti/Activiti to version 8.5.0-alpha.2 (#1432)

from: https://github.com/Activiti/Activiti

Co-authored-by: alfresco-build <>

* build(deps): bump github/codeql-action from 3.23.1 to 3.25.3 (#1429)

Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.23.1 to 3.25.3.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](github/codeql-action@0b21cf2...d39d31e)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* AAE-22123 Fix omitted methods (#1433)

* AAE-22123 fix omitted methods management

* AAE-22123 fix omitted methods management and tests

* AAE-22075 perform single queries on join table after select on task table

* Revert "AAE-22075 perform single queries on join table after select on task table"

This reverts commit 3e35763.

* AAE-22075 use jpaquery and fluentyquery

* AAE-22075 reduced number of queries, applied sorting parameters

* AAE-22075 fix sorting

* AAE-22075 fix sorting

* AAE-22075 fix

* AAE-22075 remove unused imports

* AAE-22075 remove sql logs from test

* AAE-22075 fix import

* AAE-22075 added tests

* AAE-22075 refactoring

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Akhilesh Pamidimarthi <akhilesh.pamidimarthi@hyland.com>
Co-authored-by: jesty <davidecerbo@gmail.com>
Co-authored-by: RahulKumar1606 <126051097+RahulKumar1606@users.noreply.github.com>
Co-authored-by: Alfresco Build <8039454+alfresco-build@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
AAE-22648 upgrade spring boot version to fix vulnerability
Copy link

sonarcloud bot commented May 23, 2024

Quality Gate Passed Quality Gate passed

Issues
6 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
6 participants