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

feat: Add method for checking if annotation based security is used #19038

Merged
merged 5 commits into from Mar 27, 2024

Conversation

Artur-
Copy link
Member

@Artur- Artur- commented Mar 26, 2024

No description provided.

Copy link

github-actions bot commented Mar 26, 2024

Test Results

1 091 files  ±0  1 091 suites  ±0   1h 23m 29s ⏱️ + 3m 41s
6 930 tests ±0  6 881 ✅ ±0  49 💤 ±0  0 ❌ ±0 
7 263 runs   - 6  7 202 ✅  - 6  61 💤 ±0  0 ❌ ±0 

Results for commit f7b5e3a. ± Comparison against base commit 499a1a1.

♻️ This comment has been updated with latest results.

* @return {@code true} if an {@link AnnotatedViewAccessChecker} is in use,
* {@code false} otherwise
*/
public boolean isUsingAnnotatedViewAccessChecker() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could this be a more generic method like isUsingAccessChecker(Class<? extends NavigationAccessChecker> clazz)?

I wonder if there might be a use case for checking for RoutePathAccessChecker, for example.
If possible (and it is reasonable) I would prevent having this class filled with isUsingSometing() methods.

If it does not make sense, I'm ok with this change.

Copy link
Member Author

Choose a reason for hiding this comment

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

Then the question is, should it be ”is” or ”get”

Copy link
Member Author

Choose a reason for hiding this comment

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

Made it a more generic

Copy link
Collaborator

Choose a reason for hiding this comment

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

Then the question is, should it be ”is” or ”get”

get because there may be a use case where the checker instance could be used outside the NavigationAccessControl?

Copy link

sonarcloud bot commented Mar 27, 2024

Quality Gate Passed Quality Gate passed

Issues
13 New issues
0 Accepted issues

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

See analysis details on SonarCloud

@Artur- Artur- merged commit 3ab7cc4 into main Mar 27, 2024
26 checks passed
@Artur- Artur- deleted the check-annotation-sec branch March 27, 2024 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants