18322 Commits

Author SHA1 Message Date
60d73e18e4 87: Improve code readability in DataInitializer & Reformat code 2025-04-23 14:37:06 +02:00
25ba68f929 87: Replace assertTrue with assertEquals 2025-04-23 14:03:13 +02:00
5c36cd345d 87: Use Instant instead of Date & Remove deprecated @Temporal 2025-04-23 10:39:51 +02:00
25b87579eb 87: Add test data 2025-04-16 10:28:42 +02:00
299c67e8dd 87: Add SplitProjectPopulator 2025-04-14 16:41:16 +02:00
ae3755af5b 87: Reformat code 2025-04-14 14:21:35 +02:00
2bb6fae188 87: Add more milestones & events to test data 2025-04-14 14:20:34 +02:00
6ccf72d4ab 87: Improve integration test 2025-04-14 12:56:01 +02:00
7bb47f6e09 Merge branch 'develop' into 87-split-project 2025-04-14 12:07:40 +02:00
f956ba1af8 87: Improve test 2025-04-10 14:30:05 +02:00
96eb62178d 87: Reformat code 2025-04-10 14:20:53 +02:00
80694e2c14 87: Improve test 2025-04-10 14:18:59 +02:00
4be16af51c 87: Improve test 2025-04-10 09:59:48 +02:00
d875d9ce7c 87: Update test 2025-04-09 15:17:21 +02:00
195e7f3bfb 87: Integration test in progress 2025-04-09 13:56:35 +02:00
185785582a 87: First version of integration test 2025-04-07 15:48:37 +02:00
8d5a082a6b 87: Move cancel link to same row as submit button 2025-04-07 13:31:14 +02:00
3f604ad926 87: Refactor out status message to view layer 2025-04-07 12:50:34 +02:00
13fa678ac5 87: Don't count cloned reviews. 2025-04-07 09:58:39 +02:00
d906886489 87: reformat code 2025-04-03 15:04:05 +02:00
671d05e0e1 87: Adjust sql script 2025-04-03 15:02:04 +02:00
e963bee932 87: Use other event so no notification will go 2025-04-03 12:56:20 +02:00
8465d4c687 87: Loose up some SQL-constraints 2025-04-02 15:18:46 +02:00
b04c5d439e 87: reformat code 2025-04-02 13:19:56 +02:00
57774b1c32 87: Save cloned RoughDraftApproval 2025-04-02 13:18:06 +02:00
8a050491f9 87: Add clone functionality 2025-04-02 12:44:24 +02:00
1ebf21f14b 87: Refactor SplittableStatusRecord using Java record 2025-04-02 09:41:27 +02:00
d2e5043c95 Fix CVE-2025-22228 ()
See https://spring.io/security/cve-2025-22228

Fixes 

Reviewed-on: 
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>
2025-03-28 07:18:16 +01:00
8266b1f1fe 87: Improve result page (AdminViewParentProjectPage) after split 2025-03-27 11:48:34 +01:00
d193663590 87: Fix test & Reformat code 2025-03-26 13:59:13 +01:00
7d92dc4ddb 87: Rename sql with with capital V 2025-03-26 13:24:32 +01:00
38830f3856 87: Remove SQL-file with wrong naming convention 2025-03-26 13:23:45 +01:00
0e261fc85e 87: Reformat code 2025-03-26 13:00:11 +01:00
6526dc1fd9 87: Add initial support of parent-child project 2025-03-26 12:57:18 +01:00
02dc062962 87: Add initial support of AdminViewParentProjectPage 2025-03-26 10:26:28 +01:00
f2e19b686d 87: Use service method in AdminSplitProjectPanel 2025-03-26 10:04:40 +01:00
e59178a540 87: Add initial version of SplitOrRestartProjectService 2025-03-26 09:10:31 +01:00
e95421b8f2 Use OAuth 2.0 Token Introspection during log in ()
Currently, it uses an endpoint similar to OpenID Connect UserInfo but with some differences. The endpoint does not require the "openid" scope for example. There is an ongoing effort to replace the OAuth 2.0 authorization server with a more standard compliant one which would break the endpoint (since it would require the "openid" scope). It is currently not possible to request the "openid" scope to future-proof since Spring would act differently if that scope is present and assume full OpenID Connect. That leads to requiring an id token to have been issued which the current authorization server does not do.

To get around this the implementation is changed to use a standard compliant Token Introspection endpoint to get access to the subject of the access token (which is the only part that's necessary right now). Since the endpoint is standard compliant it will work with any future authorization server.

It may be necessary to run `docker compose up --build` to get the latest version of the Toker containers.

Reviewed-on: 
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>
2025-03-25 08:45:25 +01:00
739bf1c0bd 87: Add support for split project confirmation page 2025-03-24 14:31:58 +01:00
f33956068d 87: Add initial view for splitting project 2025-03-20 09:18:39 +01:00
9fa699ed83 Upgrade Spring Boot ()
The new version has upgraded `json-smart` so the override is no longer necessary.

## How to test
1. Log in and click around as different users
2. Enable Daisy integration (both `DEV` and `DAISY-INTEGRATION` Maven profiles)
3. Go to "Admin / Users / Import" and import someone (verify JSON parsing)

Reviewed-on: 
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>
2025-03-20 06:44:13 +01:00
2ac30fa980 Add Checkstyle checking during Maven build ()
So far no rules are activated and it just puts the infrastructure in place.
Rules can be added in separately after discussion among the developers,
along with fixing any violations of the rules.

Co-authored-by: Nico Athanassiadis <nico@dsv.su.se>
Reviewed-on: 
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>
2025-03-18 09:12:41 +01:00
7504c267c5 Delete forum replies ()
Allows deleting (your own) forum replies.

Fixes 

## How to test

1. Log in as `eric@example.com` (supervisor) or as `sture@example.com` (author)
2. Open the forum in project "Putting the it in supervising"
3. Create a new thread
4. Post some replies as the different users
5. Delete the replies

Co-authored-by: Nico Athanassiadis <nico@dsv.su.se>
Reviewed-on: 
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>
2025-03-18 08:34:21 +01:00
6b77142a06 New Daisy API XSD ()
Allows a way to solve 

Reviewed-on: 
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>
2025-03-18 07:33:38 +01:00
59e3ec3fd9 Maintain project selection on validation failure during group creation ()
Fixes 

## How to test
1. Log in as `evan@example.com`
2. Go to "My groups"
3. Click "Create new group"
4. Select some projects but do *not* fill in the "Title"
5. Click save
6. Error message should be presented
7. Project selection should be maintained

Co-authored-by: Nico Athanassiadis <nico@dsv.su.se>
Reviewed-on: 
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>
2025-03-11 09:15:01 +01:00
9ede262e7b Fix crash due to JSON parsing on "Finishing up" tab ()
The seemingly unused library `jersey-hk2` that got removed in  is used, if present, internally by the Jersey client to find and register Jackson modules (such as those that provide `java.time` support).

## How to test
1. Turn on the `DAISY-INTEGRATION` Maven profile (alongside `DEV`)
2. Configure some projects and their authors to have a Daisy connection
3. Log in as the supervisor
4. Go to the "Finishing up" tab in the project
5. See that it works compared to `develop` branch

Reviewed-on: 
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>
2025-03-11 08:49:16 +01:00
de18f200a7 Make exemptions for project type apply to partner as well ()
Read  for context first

When authors select supervisor ideas during an open application period they are only allowed to select ideas corresponding to their degree type classification. This limitation can be lifted by giving the author an exemption for "Project type limitation" on the corresponding application period. However, this limitation is still enforced for any potential partner *even if* the have been given the same exemption. This change makes it so the exemption applies to any selected partner as well and not just the author selecting the supervisor idea.

## How to test
1. Log in as `oskar@example.com`
2. Go to "Ideas / My ideas" page
3. Click "Select from available ideas" on the application period "Supervisor ideas"
4. Open the one available idea
5. Try to select it with "Johan Student" as a partner
6. Log in as admin
7. Go to "Match / Application periods"
8. Click "Edit exemptions" on the "Supervisor ideas" period
9. Give "Johan Student" an exemption to "Project type limitation"
10. Repeat steps 1-5

Reviewed-on: 
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>
2025-03-10 07:17:28 +01:00
23e0a7f5ea Improvements to the Excel export of projects ()
The research area column show the string "null" instead of being an empty cell for projects without a research area. This has been fixed everywhere and not just on the project export.

The reviewer column showed weird technical details (`User#toString()`) instead of the reviewers name.

## How to test
1. On `develop` branch
2. Log in as the default admin
3. Go to "Project management / Projects"
4. Click "Excel export" under the table
5. Open the file and see
6. Repeat 1-5 on this branch

Co-authored-by: Nico Athanassiadis <nico@dsv.su.se>
Reviewed-on: 
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>
2025-03-05 14:07:47 +01:00
ed365bd7f5 Update library used to generate Excel files ()
Fixes 
Fixes 

## How to test
1. Log in as the default admin
2. Go to "Project management / Projects"
3. Click "Download as Excel" under the table
4. See that it's still a valid Excel-file

Reviewed-on: 
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>
2025-03-05 13:01:20 +01:00
5c5f03bd78 Let Spring Boot manage dependency versions ()
Since SciPro is now a Spring Boot-based application it is counter-productive to manage our own dependency versions.
* They could conflict with what Spring Boot assumes
* All libraries that are managed by Spring Boot are tested to work together

QueryDSL and JPA version properties are left in because they're needed for annotation processors (they can't be dependency managed).

Co-authored-by: Nico Athanassiadis <nico@dsv.su.se>
Reviewed-on: 
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>
2025-03-05 11:53:10 +01:00