Artemis icon indicating copy to clipboard operation
Artemis copied to clipboard

`Development`: Unify public endpoints and introduce basic authorization test

Open julian-christl opened this issue 2 years ago • 1 comments

Checklist

General

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

julian-christl avatar Aug 31 '22 22:08 julian-christl

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.

github-actions[bot] avatar Sep 08 '22 12:09 github-actions[bot]

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.

github-actions[bot] avatar Oct 06 '22 12:10 github-actions[bot]

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.

github-actions[bot] avatar Oct 20 '22 12:10 github-actions[bot]

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.

github-actions[bot] avatar Oct 29 '22 12:10 github-actions[bot]

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.

github-actions[bot] avatar Nov 18 '22 12:11 github-actions[bot]

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.

codecov-commenter avatar Nov 22 '22 02:11 codecov-commenter

Closing in favour of #5863. Bambo doesn't want to run builds for this branch.

julian-christl avatar Nov 22 '22 02:11 julian-christl