Artemis
Artemis copied to clipboard
`Development`: Unify public endpoints and introduce basic authorization test
Checklist
General
- [X] This is a small issue that I tested locally and was confirmed by another developer on a test server.
- [X] Language: I followed the guidelines for inclusive, diversity-sensitive, and appreciative language.
- [X] I chose a title conforming to the naming conventions for pull requests.
Server
- [X] I followed the coding and design guidelines.
- [X] I added multiple integration tests (Spring) related to the features (with a high test coverage).
- [X] I added pre-authorization annotations according to the guidelines and checked the course groups for all new REST Calls (security).
- [X] I implemented the changes with a good performance and prevented too many database calls.
- [X] I documented the Java code using JavaDoc style.
Motivation and Context
This follows up #5574 and #5638 and covers all public endpoints. I also add a first authorization test to check the correct annotation usage. This setup can be extended in the future with more extensive tests.
Description
I implemented a first authorization test to check the correct usage of the pre-authorization annotations. I included a new annotation for public endpoints and marked all not annotated endpoints (flagged by the test) after validating the flag, of course.
Steps for Testing
- Access and log into Artemis. This should validate that the annotation works. Please look at the changed occurrences and test more in case you feel it's necessary.
Steps for Code Review
Please check all replacements for consistency. The most relevant part is then the test and test service. If you have any suggestions on how to improve the structure, especially to be more extensible, feel free.
Review Progress
Code Review
- [ ] Review 1
- [ ] Review 2
Manual Tests
- [ ] Test 1
- [ ] Test 2
There hasn't been any activity on this pull request recently. Therefore, this pull request has been automatically marked as stale and will be closed if no further activity occurs within seven days. Thank you for your contributions.
There hasn't been any activity on this pull request recently. Therefore, this pull request has been automatically marked as stale and will be closed if no further activity occurs within seven days. Thank you for your contributions.
There hasn't been any activity on this pull request recently. Therefore, this pull request has been automatically marked as stale and will be closed if no further activity occurs within seven days. Thank you for your contributions.
There hasn't been any activity on this pull request recently. Therefore, this pull request has been automatically marked as stale and will be closed if no further activity occurs within seven days. Thank you for your contributions.
There hasn't been any activity on this pull request recently. Therefore, this pull request has been automatically marked as stale and will be closed if no further activity occurs within seven days. Thank you for your contributions.
Codecov Report
Base: 79.82% // Head: 75.56% // Decreases project coverage by -4.26%
:warning:
Coverage data is based on head (
80555c1
) compared to base (0213209
). Patch coverage: 79.68% of modified lines in pull request are covered.
Additional details and impacted files
@@ Coverage Diff @@
## develop #5640 +/- ##
=============================================
- Coverage 79.82% 75.56% -4.27%
=============================================
Files 2035 1108 -927
Lines 81402 43745 -37657
Branches 12264 8268 -3996
=============================================
- Hits 64983 33054 -31929
+ Misses 9104 5576 -3528
+ Partials 7315 5115 -2200
Flag | Coverage Δ | |
---|---|---|
client | 75.56% <79.68%> (+0.09%) |
:arrow_up: |
server | ? |
Flags with carried forward coverage won't be shown. Click here to find out more.
Impacted Files | Coverage Δ | |
---|---|---|
...word-reset/finish/password-reset-finish.service.ts | 80.00% <0.00%> (ø) |
|
...password-reset/init/password-reset-init.service.ts | 80.00% <0.00%> (ø) |
|
...in/webapp/app/account/register/register.service.ts | 80.00% <0.00%> (ø) |
|
...assessment-warning/assessment-warning.component.ts | 75.00% <ø> (ø) |
|
...p/app/core/interceptor/errorhandler.interceptor.ts | 80.00% <0.00%> (ø) |
|
...ement/tutorial-group-management-resolve.service.ts | 0.00% <0.00%> (ø) |
|
...ups-management/tutorial-groups-management.route.ts | 0.00% <0.00%> (ø) |
|
...-tutorial-group/create-tutorial-group.component.ts | 89.74% <ø> (-6.42%) |
:arrow_down: |
...it-tutorial-group/edit-tutorial-group.component.ts | 81.35% <ø> (-9.56%) |
:arrow_down: |
...rc/main/webapp/app/core/user/admin-user.service.ts | 44.44% <44.44%> (ø) |
|
... and 1041 more |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
Closing in favour of #5863. Bambo doesn't want to run builds for this branch.