Go to file
Andreas Svanberg 73307096c3
All checks were successful
Build and test / build-and-test (push) Successful in 6m50s
Fix some remaining issues from the Spring migration (#20)
A few missing `@Bean` definitions were discovered.

Spring also has a much stricter requirement about requiring `@Transactional` for every database change.

## How to test `@Bean GroupFacadeImpl`
1. Log in as a supervisor
2. Go to "My groups" and create a group
3. Go back to "My groups" and try to open the group

## How to test `@Bean IdeaFacadae`
1. Create an application period that is open ("Admin" / "Match" / "Application periods")
2. Log in as an author
3. Go to "Ideas" / "My ideas"
4. Click "Select from available ideas" in the period created in step 1

## How to test missing `@Transactional`
1. Log in as a user with notifications (or generate some by for example writing in the forum)
2. Go to "Notifications" in the top right
3. Click on any notification subject to navigate to it

## How to test crash while trying to schedule final seminar
1. Log in as a supervisor
2. Open a project and attempt to schedule a final seminar

## How to test crash while trying to upload final thesis as supervisor
1. Log in as supervisor
2. Note down the supervisors username
3. Open a project that has had a final seminar
4. Go to the "Finishing up" tab
5. Submit the supervisors username as the custom principal
6. Try to upload a final thesis

## How to test removal of approved final thesis
1. Log in as supervisor
2. Note down the supervisors username
3. Open a project that has had a final seminar
4. Go to the "Finishing up" tab
5. Submit the supervisors username as the custom principal
6. Upload a final thesis
7. Approve the final thesis
8. Remove the approval

## How to test crash while trying to schedule first meeting
1. Log in as supervisor
2. Open a project
3. Go to the "First meeting tab"
4. Try to submit

## How to test crash while trying to unselect an idea as an author
1. Create an application period that is open ("Admin" / "Match" / "Application periods")
2. Log in as an author
3. Go to "Ideas" / "My ideas"
4. Click "Select from available ideas" in the period created in step 1
5. Select any available supervisor idea
6. Go back to "Ideas" / "My ideas"
7. Open the selected idea
8. Hit unselect at the bottom

## How to test crash while trying to toggle milestone
1. Log in as supervisor
2. Open any project
3. Go to "Milestones" tab
4. Attempt to toggle both individual and project milestones

## How to test crash while trying to get user's note
1. Find a user without a row in the `note` table
2. Log in as that user
3. Click "My notes" in the top right

Reviewed-on: #20
Reviewed-by: Nico Athanassiadis <nico@dsv.su.se>
Co-authored-by: Andreas Svanberg <andreass@dsv.su.se>
Co-committed-by: Andreas Svanberg <andreass@dsv.su.se>
2024-11-20 12:56:21 +01:00
.gitea/workflows Build and test on each push (#9) 2024-10-30 10:19:50 +01:00
.mvn/wrapper Build and test on each push (#9) 2024-10-30 10:19:50 +01:00
api Enable creating an API using Spring Web (#5) 2024-11-06 11:23:28 +01:00
core Fix some remaining issues from the Spring migration (#20) 2024-11-20 12:56:21 +01:00
daisy-integration Enable creating an API using Spring Web (#5) 2024-11-06 11:23:28 +01:00
resources/db_update_scripts new db file 2013-10-10 11:16:14 +09:00
view 3471: Reduced size of textarea as requested, also made small reformatting of Java code (#19) 2024-11-19 12:17:15 +01:00
war Fix users getting stuck at a blank white page after logging in. (#16) 2024-11-13 08:01:17 +01:00
.gitignore Enable creating an API using Spring Web (#5) 2024-11-06 11:23:28 +01:00
.mailmap Updated git mailmap. 2015-02-05 15:56:03 +01:00
docker-compose.yml Enable creating an API using Spring Web (#5) 2024-11-06 11:23:28 +01:00
GetToken.java Enable creating an API using Spring Web (#5) 2024-11-06 11:23:28 +01:00
mvnw Build and test on each push (#9) 2024-10-30 10:19:50 +01:00
mvnw.cmd Build and test on each push (#9) 2024-10-30 10:19:50 +01:00
owasp.xml Supress bogus security vulnerability 2024-04-22 09:30:47 +02:00
parallel.sh Bash script to enable parallel deployment. 2014-05-08 09:54:39 +02:00
pom.xml Enable creating an API using Spring Web (#5) 2024-11-06 11:23:28 +01:00
README.md Enable creating an API using Spring Web (#5) 2024-11-06 11:23:28 +01:00

Working with the API

The API is protected by OAuth 2 acting as a resource server verifying tokens using token introspection.

When developing it uses a locally running instance of an authorization server that is run inside Docker. It can be started with docker compose -f docker-compose.yml up. Since there is no frontend to interact with the authorization server there's a helper script in GetToken.java that can be run directly with java GetToken.java to run through the authorization flow and get an access token.

Once the token has been obtained go to the Swagger UI to interact with the API. Click the "Authorize" button in the top right and paste the access token to log in.