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

tests: refactor tests with authentication #76

Merged
merged 7 commits into from
Jul 8, 2024

Conversation

BettyB979
Copy link
Contributor

No description provided.

@BettyB979 BettyB979 marked this pull request as ready for review July 8, 2024 13:31

for (String role : listRoles) {
this.grantedRoles.put(role,
new SimpleGrantedAuthority(roleEnum.securityRole()));
Copy link
Contributor

Choose a reason for hiding this comment

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

what if same config role for multiple app roles ?

@@ -30,9 +29,6 @@
import java.util.List;

@RestController
@PreAuthorize("@AuthorizeMethodDecider.isInternalUser() "
Copy link
Contributor

Choose a reason for hiding this comment

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

normal to not have preauthorize in new version ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oups

@@ -98,9 +97,6 @@ public ResponseEntity<?> getQuestioningsBySurveyUnit(@PathVariable("id") String

}

@PreAuthorize("@AuthorizeMethodDecider.isInternalUser() "
Copy link
Contributor

Choose a reason for hiding this comment

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

no preauthorize in new version ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@PreAuthorize(AuthorityPrivileges.HAS_MANAGEMENT_PRIVILEGES) already on top of controller

Copy link

sonarqubecloud bot commented Jul 8, 2024

@BettyB979 BettyB979 merged commit 8cf03fc into feat-orbeon-endpoint Jul 8, 2024
2 checks passed
@BettyB979 BettyB979 deleted the test-david branch July 8, 2024 15:13
BettyB979 added a commit that referenced this pull request Jul 10, 2024
* feat: wip: add orbeon endpoint to get questioning informations

* feat: add missing fields ans change address dto

* feat: add endpoint for weblient orbeon to get  questioning informations

* tests: dd unit tests for QuestioningInformationsService

* fix: validation and habilitations for endpoint orbeon

* feat: reviewer or interviewer informations (main contact or not)

* fix: role check

* fix: sonar issues

* fix: sonar issues

* fix: remove double test

* tests: refactor tests with authentication and add cucumber first test (#76)

* tests: add cucumber config and first tests

* fix: prepare security roles

* test: try authentication

* fix: athority privileges and authentication context

* fix: tests with authentification

* fix: add preauthorize

* fix: same config role for multiple app roles

---------

Co-authored-by: davdarras <[email protected]>

* fix: authentication name case insensitive

* fix: moog test (add authentication)

---------

Co-authored-by: davdarras <[email protected]>
BettyB979 added a commit that referenced this pull request Aug 6, 2024
* Feat: add orbeon endpoint to get questioning informations (#73)

* feat: wip: add orbeon endpoint to get questioning informations

* feat: add missing fields ans change address dto

* feat: add endpoint for weblient orbeon to get  questioning informations

* tests: dd unit tests for QuestioningInformationsService

* fix: validation and habilitations for endpoint orbeon

* feat: reviewer or interviewer informations (main contact or not)

* fix: role check

* fix: sonar issues

* fix: sonar issues

* fix: remove double test

* tests: refactor tests with authentication and add cucumber first test (#76)

* tests: add cucumber config and first tests

* fix: prepare security roles

* test: try authentication

* fix: athority privileges and authentication context

* fix: tests with authentification

* fix: add preauthorize

* fix: same config role for multiple app roles

---------

Co-authored-by: davdarras <[email protected]>

* fix: authentication name case insensitive

* fix: moog test (add authentication)

---------

Co-authored-by: davdarras <[email protected]>

* feat: improve search contact for new pilotage front (#79)

* feat: search contact with one parameter

* fix: param not required in search contact

* chore(deps): update versions

* Update ContactRepository.java

* fix: search contact with contains

* feat: add second phone number

* fix(tests): reinit conext for tests

* fix: improve search contact (#81)

* fix: improve search contact endpoint

* fix: null param in search contact

* fix: improve search request

* fix: request find by name

* test: fix tests

* chore: update dependencies and bump version 2.5.0

---------

Co-authored-by: davdarras <[email protected]>
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.

2 participants