Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Final merge 🎉 #297

Merged
merged 556 commits into from
May 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
556 commits
Select commit Hold shift + click to select a range
6d2bb37
Fixed incorrect API route
usserwoutV2 May 16, 2024
0f06865
Merge branch 'frontend' into feature/submissionUpload-2
AWerbrouck May 16, 2024
d964342
Merge pull request #260 from SELab-2/feature/submissionUpload-2
AWerbrouck May 16, 2024
ef946cf
Added docker zip file uploading
Triver1 May 16, 2024
fc62123
gevraagde changes geimplementeerd
badduck32 May 16, 2024
a193b27
added lots of extra frontend tests
arnedierick May 16, 2024
9d3148c
added final component tests so all finished components/pages are prop…
arnedierick May 16, 2024
d708cf2
Fixed course description not rendering markdown
usserwoutV2 May 16, 2024
ce66035
Fixed markdown not rendering
usserwoutV2 May 16, 2024
7be5e77
Added new docker dir upload btn
usserwoutV2 May 16, 2024
b7b0b77
Added api requests for upload tests directory
usserwoutV2 May 16, 2024
394c169
Bug fixes
usserwoutV2 May 16, 2024
e4a17d9
submissions geupdated zodat ze met nieuwe soorten feedback kunnen omgaan
badduck32 May 17, 2024
f7ae28f
Update populate_database.sql
Aqua-sc May 17, 2024
9aac6db
Uploading/deleting/getting extra testfiles
Aqua-sc May 17, 2024
35f9b02
rename util folder to extra + call addUtilFiles
Aqua-sc May 17, 2024
abc8b56
Allow admin to submit
Aqua-sc May 17, 2024
ff585a6
Update SubmissionController.java
Aqua-sc May 17, 2024
a06f744
added extra submission status
usserwoutV2 May 17, 2024
12170ee
extra functionaliteit submissioncard
badduck32 May 17, 2024
b449311
submission ongeveer af
badduck32 May 17, 2024
54c4257
vertalingen
badduck32 May 17, 2024
87fa0a8
Keep filename of uploaded extratestfiles
Aqua-sc May 17, 2024
fe8daf8
Updated submissionControllerTests
Aqua-sc May 17, 2024
f0224e1
TestControllTest updated
Aqua-sc May 17, 2024
af3fe07
All test updated now
Aqua-sc May 17, 2024
e960f7e
Updated tests
Aqua-sc May 17, 2024
6401ca7
visible_after field works
Aqua-sc May 17, 2024
4f94fb4
Added studentnumber fields
Aqua-sc May 17, 2024
e106cd8
Update tests
Aqua-sc May 17, 2024
a48ade6
Add studentnumber to user(reference)json
Aqua-sc May 17, 2024
93f5e82
updated tests
Aqua-sc May 17, 2024
56abe4a
Some small UI changes + fixed submission status
usserwoutV2 May 17, 2024
5254748
Updated types
usserwoutV2 May 17, 2024
5dcc833
Merge pull request #265 from SELab-2/fontend/submission-update
usserwoutV2 May 17, 2024
ef2cb35
Fixed styles with tabel header
usserwoutV2 May 17, 2024
a16ddad
Fixed merge confllict
usserwoutV2 May 17, 2024
9b495e7
Fixed more merge conflicts
usserwoutV2 May 17, 2024
395125f
Merge pull request #232 from SELab-2/frontend-edit-role2
usserwoutV2 May 17, 2024
7907a85
Fixed test to work on all os, by making the find consistent.
Triver1 May 17, 2024
5487fb7
Fixed table header color, fixed bugs with joining groups
usserwoutV2 May 17, 2024
7437706
Added tryTemplate function
Triver1 May 17, 2024
2903174
Fixed project tabs bugs
usserwoutV2 May 17, 2024
73604b4
Added lockGroupsAfter
Aqua-sc May 18, 2024
7b91b24
Updated tests
Aqua-sc May 18, 2024
746a319
small fix to accepted fields if no test
Aqua-sc May 18, 2024
e8e2d3b
Merge pull request #266 from SELab-2/feature/studentnummer_en_project…
usserwoutV2 May 18, 2024
68a3e7d
Changed 'go back' btn route
usserwoutV2 May 18, 2024
534b14f
Fixed merge conflict
usserwoutV2 May 18, 2024
a8c3548
Merge pull request #264 from SELab-2/feature/courseadminsubmit
usserwoutV2 May 18, 2024
b274bdc
Fixed merge conflict (hopefully merged correctly)
usserwoutV2 May 18, 2024
4516f6b
Merge pull request #263 from SELab-2/feature/extra_files_in_test
usserwoutV2 May 18, 2024
cd720b7
idk
usserwoutV2 May 18, 2024
38a2861
Fixed merge conflict
usserwoutV2 May 18, 2024
9b2f9c2
add NoResourceFoundException tot errorhandling
Aqua-sc May 18, 2024
502a887
Fixed download/upload tests directory in project page
usserwoutV2 May 18, 2024
ed87b0a
temp fix for docker image check
usserwoutV2 May 18, 2024
19ef550
Merge branch 'frontend' into feature/project-automatically-visible
arnedierick May 18, 2024
149f70f
Fixed imageExists
Triver1 May 18, 2024
23300f3
Added functionality for course_admins to make projects visible to stu…
arnedierick May 18, 2024
a97a5f8
Added test submission for course admins, added lock to groups component
usserwoutV2 May 18, 2024
b13abdd
Updated type
usserwoutV2 May 18, 2024
355ff0b
Added UI in the projectTable (where useIsCourseAdmin is defined) so a…
arnedierick May 18, 2024
851bdac
env builder 🎉
AWerbrouck May 18, 2024
ad77b1f
Merge remote-tracking branch 'origin/development' into development
AWerbrouck May 18, 2024
0d56e76
Merge branch 'development' into feature/project-automatically-visible
arnedierick May 18, 2024
b03284c
Implemented requested changes
arnedierick May 18, 2024
e66fc4a
Test works now
arnedierick May 19, 2024
09fc569
Merge pull request #269 from SELab-2/feature/project-automatically-vi…
arnedierick May 19, 2024
c05c21f
Make score no longer required
Aqua-sc May 19, 2024
b84efdb
Updated getAllSubmissionJson
Aqua-sc May 19, 2024
145e5a1
Add route to download all submission files
Aqua-sc May 19, 2024
1adb9f0
Fixed tests
Aqua-sc May 19, 2024
c4c0c42
Added test for addToExistingZip
Aqua-sc May 19, 2024
fda84f2
Improved/fixed submissions table
usserwoutV2 May 19, 2024
312f172
Added limit to amount of MB you can upload in frontend
usserwoutV2 May 19, 2024
10b8c6f
added docs link
usserwoutV2 May 19, 2024
824a9c6
Test for getSubmissionFiles
Aqua-sc May 19, 2024
413b0cd
artifacts are downloadable if exist
usserwoutV2 May 19, 2024
e9b3a17
Added prefix to tempfiles
Aqua-sc May 19, 2024
cd2020a
artifacts URL null if no artifacts
Aqua-sc May 19, 2024
b5036c9
Merge pull request #270 from SELab-2/allsubmissionsdownload
usserwoutV2 May 19, 2024
9667598
Removed broken tests
usserwoutV2 May 19, 2024
40810de
idk
usserwoutV2 May 18, 2024
c88d48b
merged with dev
usserwoutV2 May 19, 2024
e4aedb2
Login working in test frontend
Matthias-VE May 19, 2024
b2cdb68
change port nmber
Matthias-VE May 19, 2024
1beb822
solve merge conflicts
Matthias-VE May 19, 2024
613ed0e
Merge pull request #271 from SELab-2/frontend
AWerbrouck May 19, 2024
78a4b79
react integration
Matthias-VE May 19, 2024
7164ff4
request spam fixed
Matthias-VE May 19, 2024
fcbd844
bugfixes
Matthias-VE May 19, 2024
8022c23
merge conflict frontend
Matthias-VE May 19, 2024
313d55f
use of apiCall
Matthias-VE May 19, 2024
b86994c
Merge branch 'development' into feature/regex_invert_template_validation
Triver1 May 19, 2024
87f1b57
Added regex inversion, revamped template validation with proper error…
Triver1 May 19, 2024
358081b
documentation and cleanup for production
Matthias-VE May 20, 2024
6fa01c4
post data bug fix
Matthias-VE May 20, 2024
6d19910
comment mongostore
Matthias-VE May 20, 2024
346c866
comment
Matthias-VE May 20, 2024
d79a444
removed unsued route
Matthias-VE May 20, 2024
8090bf9
fix route
Matthias-VE May 20, 2024
65a81e0
Merge pull request #272 from SELab-2/feature/no-msal-react
Matthias-VE May 20, 2024
d21c93c
Fix tests
Aqua-sc May 20, 2024
2e57e2e
edit hard coded urls
Matthias-VE May 20, 2024
1801b0d
Merge pull request #274 from SELab-2/feature/no-msal-react
Matthias-VE May 20, 2024
1d2bcd2
small change to feedback
Aqua-sc May 20, 2024
d6c846d
app.conf changes
Matthias-VE May 20, 2024
2282ad7
small conf change
Matthias-VE May 20, 2024
31b9290
small conf change
Matthias-VE May 20, 2024
e88b6f6
Merge pull request #275 from SELab-2/feature/nginx_routes
AWerbrouck May 20, 2024
5c90d5e
React readme removal
Triver1 May 20, 2024
5ca9154
alle docstrings toegevoegd en correcte apidog link gemaakt
badduck32 May 20, 2024
79e5077
error handling
Matthias-VE May 20, 2024
877bf12
Bug fixes
usserwoutV2 May 20, 2024
31e3de2
Added breadcrumbs
usserwoutV2 May 20, 2024
b4b2607
Fixed alignment of breadcrumbs in project edit page
usserwoutV2 May 20, 2024
8f81a87
Added .env to gitignore
Aqua-sc May 21, 2024
378bcb4
Sort projects for coursecard + small backend fix
Aqua-sc May 21, 2024
8326a04
Small backend fix for template docker feedback
Aqua-sc May 21, 2024
215182a
get(...) ipv getLast()
Aqua-sc May 21, 2024
c0c96a9
Merge pull request #277 from SELab-2/feature/regex_invert_template_va…
Aqua-sc May 21, 2024
2da12e9
More bug fixes
usserwoutV2 May 21, 2024
5598ce0
Merge pull request #279 from SELab-2/feature/forward-errors
Matthias-VE May 21, 2024
2e9c2c5
Merge pull request #278 from SELab-2/docstrings
Matthias-VE May 21, 2024
d176929
Small fix to backend
Aqua-sc May 21, 2024
2e9dbca
Even more bug fixes
usserwoutV2 May 21, 2024
4a8dd03
Updated submission page
usserwoutV2 May 21, 2024
6bf44c5
Improved submission page
usserwoutV2 May 21, 2024
96cad66
better env build + cleanup
AWerbrouck May 21, 2024
0a1ed77
Update user object when role changes
usserwoutV2 May 21, 2024
35b317c
merge with dev
arnedierick May 21, 2024
c6ecb9d
fixed some tests
arnedierick May 21, 2024
aa89f97
Fixed multipart file uploads not working
Matthias-VE May 21, 2024
b34da36
added more info to project page
arnedierick May 21, 2024
19058de
small changes to project info and added homepage title logic based on…
arnedierick May 21, 2024
7305dc8
Merge pull request #280 from SELab-2/fix/multibpart
Matthias-VE May 21, 2024
bf2be71
done
badduck32 May 21, 2024
3d43dd1
Updated tooltips and made changes to docker tests page so it is as cl…
Triver1 May 21, 2024
d6cbe8e
Merge branch 'frontend' into test_page_update
Triver1 May 21, 2024
063ff74
done
badduck32 May 22, 2024
cea07e9
debug dingen veranderd
badduck32 May 22, 2024
7bd211c
Fix for tests
Aqua-sc May 22, 2024
1ae569a
Fix for sturcturefeedback + admin submit after deadline
Aqua-sc May 22, 2024
f4adc8d
Fix test
Aqua-sc May 22, 2024
9f12dde
fixed multiline feedback input and rendering
arnedierick May 22, 2024
16bdc2b
Merge branch 'frontend' of https://github.com/SELab-2/UGent-6 into fr…
arnedierick May 22, 2024
ab468a2
removed broken tests
AWerbrouck May 22, 2024
cb4fa64
Merge pull request #262 from SELab-2/feature/fronted-testing
AWerbrouck May 22, 2024
8954d71
added hovering, removed ellipsis
badduck32 May 22, 2024
f3021c3
fix graphical bug with "en" appearing under the globe icon
badduck32 May 22, 2024
54fbab3
download changes
badduck32 May 22, 2024
567992d
Rename testing.yml to backend_testing.yaml
AWerbrouck May 22, 2024
475f9fe
Merge pull request #286 from SELab-2/AWerbrouck-patch-1
AWerbrouck May 22, 2024
99a70c8
Update README.md
AWerbrouck May 22, 2024
18d2eca
Update README.md
AWerbrouck May 22, 2024
8af988f
Merge pull request #285 from SELab-2/batch-download-change
usserwoutV2 May 22, 2024
8aa0954
Merge pull request #284 from SELab-2/language-dropdown-fix
usserwoutV2 May 22, 2024
91702c1
Fixed hover background for light mode
usserwoutV2 May 22, 2024
1c0011b
Made dark theme hover background less light
usserwoutV2 May 22, 2024
bf8a8e8
Cleanup messages
Aqua-sc May 22, 2024
5c46196
typos fixed
badduck32 May 22, 2024
43af6cb
Full width coursecard highlight's on hover
Aqua-sc May 22, 2024
5aac1fb
Merge pull request #283 from SELab-2/course-card-update
Aqua-sc May 22, 2024
f1fd99b
Merge pull request #282 from SELab-2/test_page_update
Aqua-sc May 22, 2024
f41ea5c
fixed margin for save feedback button
Aqua-sc May 22, 2024
afbe2a3
Merge branch 'frontend' of https://github.com/SELab-2/UGent-6 into fr…
Aqua-sc May 22, 2024
1784bc1
Make template switch smaller
Aqua-sc May 22, 2024
1509256
ProjectForm upgrades
Aqua-sc May 22, 2024
f74d29f
Add number to submission title + crumb
Aqua-sc May 22, 2024
8dd4b6e
Merge pull request #281 from SELab-2/sorting-fix
Aqua-sc May 22, 2024
c748cd3
Bug fixes / improvements
usserwoutV2 May 22, 2024
bd9bc66
Fixed bug in dockerTabForm
usserwoutV2 May 22, 2024
cbaf4a5
Add option to escape outputs to dockerfeedback
Aqua-sc May 22, 2024
af28d6e
Change courses title on homepage
Aqua-sc May 22, 2024
3b83a51
temp changes @matthias help me :sob:
Triver1 May 22, 2024
c7d19de
Fixed what's visible on home screen
Aqua-sc May 22, 2024
5c24c05
Fixed textfield input
Matthias-VE May 22, 2024
1e7ede3
remove wahoo
Matthias-VE May 22, 2024
5f3843f
Revert "remove wahoo"
Matthias-VE May 22, 2024
90f47f9
Revert "Fixed textfield input"
Matthias-VE May 22, 2024
9643c2b
working but now with form states instead of react states
Matthias-VE May 22, 2024
684d4d7
made weekdays more pronounced
badduck32 May 22, 2024
6cb0de8
Merge pull request #287 from SELab-2/calendar-fix
Aqua-sc May 22, 2024
6ae2142
Change height of homepage scrollbar
Aqua-sc May 22, 2024
b6b58e2
changes with invite link
badduck32 May 23, 2024
73e6610
onnodigheden verwijderd
badduck32 May 23, 2024
86b4f31
fixed padding for projectcard
Aqua-sc May 23, 2024
536b15c
Added create group btn
usserwoutV2 May 23, 2024
2b9ef03
You can delete group clusters
usserwoutV2 May 23, 2024
c90202d
Update README.md
AWerbrouck May 23, 2024
afca1c8
Fixed issue with score
usserwoutV2 May 23, 2024
7849c57
resize img
AWerbrouck May 23, 2024
240865f
removed BEAANNZZZ
AWerbrouck May 23, 2024
3407e0c
Update backend_testing.yaml
AWerbrouck May 23, 2024
562871b
Update README.md
AWerbrouck May 23, 2024
622e949
Merge pull request #289 from SELab-2/AWerbrouck-patch-2
AWerbrouck May 23, 2024
35d3f62
added docker icons
Triver1 May 23, 2024
3f4949d
moving model/json to json + optimizing imports
AWerbrouck May 23, 2024
5ff90d1
optimizing imports
AWerbrouck May 23, 2024
f480e59
Merge pull request #290 from SELab-2/feature/jsonRefactor
AWerbrouck May 23, 2024
cc5538a
Cancel button + noscore not in edit
Aqua-sc May 23, 2024
a1f5cdc
small fixes
Aqua-sc May 23, 2024
22b1167
Added extra line to template info
Aqua-sc May 23, 2024
e20eac3
edited the share button in the modal popup
badduck32 May 23, 2024
81ebeea
Merge pull request #292 from SELab-2/edit-feedback-update
badduck32 May 23, 2024
74f8423
Fixed copy button in model
Aqua-sc May 23, 2024
a51ccd7
small fixes
Aqua-sc May 23, 2024
71454ae
fixed submission index
Aqua-sc May 23, 2024
5762ec0
Negative score will show frontend error message
usserwoutV2 May 23, 2024
088e14b
Added border to modals (dark mode)
usserwoutV2 May 23, 2024
873cbfd
Improved delete confirmPopup for removing clusters
usserwoutV2 May 23, 2024
a66e1da
fix select correct role on dropdown
Aqua-sc May 23, 2024
2889d62
Merge branch 'frontend' of https://github.com/SELab-2/UGent-6 into fr…
Aqua-sc May 23, 2024
9bb9c2f
Removed useless console logs
usserwoutV2 May 23, 2024
902dd97
fix merge conflicts dev/frontend
Matthias-VE May 23, 2024
03823d4
Merge branch 'frontend' of https://github.com/SELab-2/UGent-6 into fr…
Matthias-VE May 23, 2024
ee76fb2
FIxed Collapse switching when deleting cluster
usserwoutV2 May 23, 2024
fa4c176
sort groups
Aqua-sc May 23, 2024
76b9dac
Merge branch 'frontend' of https://github.com/SELab-2/UGent-6 into fr…
Aqua-sc May 23, 2024
e7956a3
Stop propagation on cancel deletecluster
Aqua-sc May 23, 2024
b3da71d
Merge pull request #288 from SELab-2/share-fix
Aqua-sc May 23, 2024
76f9efc
update dockertestdirtooltip
Aqua-sc May 23, 2024
ca76d0b
Merge branch 'frontend' of https://github.com/SELab-2/UGent-6 into fr…
Aqua-sc May 23, 2024
8e0f1f7
added container menu dropdown
Triver1 May 23, 2024
1ae37c3
made the search bar cleaner and fixed some minor bugs
badduck32 May 23, 2024
51881a3
Merge branch 'frontend' into test_page_update
Triver1 May 23, 2024
1c522ed
Delete app.conf
AWerbrouck May 23, 2024
7d193fe
Delete nuke.sh
AWerbrouck May 23, 2024
6a544db
start docker toggle fix
Aqua-sc May 22, 2024
90bf392
Fixed requested issue (I think)
usserwoutV2 May 22, 2024
6c90413
Attempt 2 to fix docker mode switch
usserwoutV2 May 22, 2024
3470f1b
Fixed docker form not always saving
usserwoutV2 May 23, 2024
9bd9b31
Fixed typescript err
usserwoutV2 May 23, 2024
368c6f7
start docker toggle fix
Aqua-sc May 22, 2024
75667d7
Fixed requested issue (I think)
usserwoutV2 May 22, 2024
c7ec782
Attempt 2 to fix docker mode switch
usserwoutV2 May 22, 2024
1f786b1
Fixed docker form not always saving
usserwoutV2 May 23, 2024
eace8d9
Fixed so can't change own file
Aqua-sc May 23, 2024
b145026
Fixed 100 000 merge conflicts
usserwoutV2 May 23, 2024
b2e85a3
Fix test failure
Aqua-sc May 23, 2024
87c9415
Fix error message edit role
Aqua-sc May 23, 2024
caea261
Merge pull request #294 from SELab-2/search-bar-fix
Aqua-sc May 23, 2024
90642fc
Merge pull request #293 from SELab-2/test_page_update
Aqua-sc May 23, 2024
3410bd8
Merge branch 'development' into frontend
Aqua-sc May 23, 2024
ce6dd2c
Merge branch 'frontend' of https://github.com/SELab-2/UGent-6 into fr…
Aqua-sc May 23, 2024
7549026
Merge pull request #295 from SELab-2/frontend
Aqua-sc May 23, 2024
1140909
Fix tests
usserwoutV2 May 23, 2024
092af13
tests
usserwoutV2 May 23, 2024
36a3514
Merge pull request #296 from SELab-2/dev-test
usserwoutV2 May 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
13 changes: 13 additions & 0 deletions .env-template
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
client-secret=<your-client-secret>
client-id=<your-client-id>
tenant-id=<your-tenant-id>
PGU=<your-postgres-user>
PGP=<your-postgres-password>
POSTGRES_USER=${PGU}
URI=<your-uri>
EXPRESS_SESSION_SECRET=<your-express-session-secret>
PORT=<your-port>
ENVIRONMENT=<your-environment>
DB_HOST=<your-db-host>
DB_PORT=<your-db-port>
DB_NAME=<your-db-name>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: running test with github actions
name: Backend Testing
on: pull_request

jobs:
Expand All @@ -11,4 +11,4 @@ jobs:
uses: actions/setup-java@v1
with:
java-version: 17
- run: gradle test -p backend/app/
- run: gradle unitTests -p backend/app/
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
backend/web-bff/App/.env.dev

HELP.md
.gradle
build/
Expand Down Expand Up @@ -36,7 +38,17 @@ out/
.vscode/
backend/app/data/*
backend/data/*
backend/tmp/*
backend/app/tmp/*
data/*

### Secrets ###
backend/app/src/main/resources/application-secrets.properties
docker.env


./startBackend.sh
startBackend.sh

/.env
backend/web-bff/App/.env
58 changes: 56 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,57 @@
# UGent-6
![badge](https://github.com/SELab-2/UGent-6/actions/workflows/backend_testing.yaml/badge.svg)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)

<img src="https://github.com/SELab-2/UGent-6/assets/15960534/bf16e825-2d96-46af-8dc0-12ec03ba545b" width="700">



| Student | E-mailadres |
----------------------------------------------------|-----------------------------|
| [Matthias Vaneyck](https://github.com/Matthias-VE) | [email protected] |
| [Inti Danschutter](https://github.com/Aqua-sc) | [email protected] |
| [Arthur Werbrouck](https://github.com/AWerbrouck) | [email protected] |
| [Arne Dierick](https://github.com/arnedierick) | [email protected] |
| [Wout Verdyck](https://github.com/usserwoutV2) | [email protected] |
| [Floris Kornelis Van Dijken](https://github.com/badduck32) | [email protected] |
| [Tristan Verbeken](https://github.com/TR1VER) | [email protected]|


[wiki documentation](https://github.com/SELab-2/UGent-6/wiki)

[api documentation](https://apidog.com/apidoc/project-467959)
## Tree view of the project

- backend
- app
- src
- main/java/com/ugent/pidgeon
- auth (Authentication related logic)
- config (Configuration settings and beans)
- controllers (Web controllers for handling requests)
- model (models for testing submissions)
- json (request/response bodies)
- postgre (Database models and repositories)
- util (Utility classes and helpers)
- resources (Configuration files, property files etc.)
- test/java/com/ugent/pidgeon (Unit and integration tests)
- database (Database schemas and scripts)
- db (Database related scripts)
- web-bff (Express webserver that manages user authentication with cookie sessions)

- frontend
- public (Static files like images, fonts, and `index.html`)
- src
- @types (TypeScript type definitions)
- assets (Static assets like images and logos used in the app)
- components (Reusable UI components)
- common (Commonly used components across the application)
- forms (Form components, including project form tabs)
- layout (Components related to layout such as navbars and sidebars)
- hooks (Custom React hooks)
- i18n (Internationalization setup, including language files)
- pages (Component structure for each page)
- providers (Context providers for state management)
- router (Routing and path management)
- theme (Styling themes and fonts)
- util (Utility functions and helpers such as our `apiFetch`)

https://github.com/SELab-2/UGent-6/wiki
34 changes: 0 additions & 34 deletions app.conf

This file was deleted.

2 changes: 2 additions & 0 deletions backend/app/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ RUN mkdir /app

COPY --from=build /home/gradle/src/build/libs/*T.jar /app/spring-boot-application.jar
ENTRYPOINT ["java", "-jar","/app/spring-boot-application.jar"]

#@Relevant
Empty file added backend/app/artifactPath
Empty file.
41 changes: 35 additions & 6 deletions backend/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
runtimeOnly 'org.postgresql:postgresql'
implementation 'org.springframework.boot:spring-boot-starter-oauth2-client'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.security:spring-security-config'
implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server'
Expand All @@ -44,13 +43,43 @@ dependencies {
implementation "org.springframework.boot:spring-boot-devtools"
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.springframework.security:spring-security-test'
testImplementation 'org.mockito:mockito-junit-jupiter:4.0.0'
implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310'
testImplementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310'
}

// tasks.named('test',Test) {
// useJUnitPlatform()
// maxHeapSize = '1G'

// testLogging {
// events "passed"

// }
// }

task unitTests (type: Test){

exclude '**/docker'

useJUnitPlatform()
maxHeapSize = '1G'

testLogging {
events "passed"
}

}

tasks.named('test',Test) {
task allTest (type: Test) {

include '**'
useJUnitPlatform()
maxHeapSize = '1G'
maxHeapSize = '1G'


testLogging {
events "passed"
}
testLogging {
events "passed"
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package com.ugent.pidgeon;

import java.time.OffsetDateTime;

public record ApiErrorReponse(OffsetDateTime timestamp, int status, String error, String message, String path) {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
package com.ugent.pidgeon;


import jakarta.servlet.http.HttpServletRequest;
import java.time.OffsetDateTime;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.http.converter.HttpMessageNotReadableException;
import org.springframework.web.HttpRequestMethodNotSupportedException;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.method.annotation.MethodArgumentTypeMismatchException;
import org.springframework.web.servlet.NoHandlerFoundException;
import org.springframework.web.servlet.resource.NoResourceFoundException;

@ControllerAdvice
public class GlobalErrorHandler {



private void logError(Exception ex) {
Logger logger = Logger.getGlobal();
// Log the error with the logger
logger.log(Level.SEVERE, ex.getMessage(), ex);
}

/* Gets thrown when a invalid json is sent */
@ExceptionHandler(HttpMessageNotReadableException.class)
public ResponseEntity<ApiErrorReponse> handleHttpMessageNotReadableException(HttpServletRequest request, Exception ex) {
logError(ex);
String path = request.getRequestURI();
HttpStatus status = HttpStatus.BAD_REQUEST;
return ResponseEntity.status(status).body(new ApiErrorReponse(OffsetDateTime.now(), status.value(),status.getReasonPhrase(),
"Unable to process the request due to invalid or missing data. Please ensure the request body is properly formatted and all required fields are provided.", path));
}

/* Gets thrown when endpoint doesn't exist */
@ExceptionHandler(NoHandlerFoundException.class)
public ResponseEntity<ApiErrorReponse> handleNoHandlerFoundException(HttpServletRequest request, Exception ex) {
logError(ex);
String path = request.getRequestURI();
HttpStatus status = HttpStatus.NOT_FOUND;
return ResponseEntity.status(status).body(new ApiErrorReponse(OffsetDateTime.now(), status.value(), status.getReasonPhrase(),
"Resource/endpoint doesn't exist", path));
}

@ExceptionHandler(NoResourceFoundException.class)
public ResponseEntity<ApiErrorReponse> handleNoResourceFoundException(HttpServletRequest request, Exception ex) {
logError(ex);
String path = request.getRequestURI();
HttpStatus status = HttpStatus.NOT_FOUND;
return ResponseEntity.status(status).body(new ApiErrorReponse(OffsetDateTime.now(), status.value(), status.getReasonPhrase(),
"Resource/endpoint doesn't exist", path));
}

/* Gets thrown when the method is not allowed */
@ExceptionHandler(HttpRequestMethodNotSupportedException.class)
public ResponseEntity<ApiErrorReponse> handleMethodNotSupportedException(HttpServletRequest request, Exception ex) {
logError(ex);
String path = request.getRequestURI();
HttpStatus status = HttpStatus.METHOD_NOT_ALLOWED;
return ResponseEntity.status(status).body(new ApiErrorReponse(OffsetDateTime.now(), status.value(), status.getReasonPhrase(),
"Method not supported", path));
}

/* Gets thrown when u path variable is of the wrong type */
@ExceptionHandler(MethodArgumentTypeMismatchException.class)
public ResponseEntity<ApiErrorReponse> handleMethodArgumentTypeMismatchException(HttpServletRequest request, Exception ex) {
logError(ex);
String path = request.getRequestURI();
HttpStatus status = HttpStatus.BAD_REQUEST;
return ResponseEntity.status(status).body(new ApiErrorReponse(OffsetDateTime.now(), status.value(), status.getReasonPhrase(),
"Invalid url argument type", path));
}

/* Gets thrown when an unexpected error occurs */
@ExceptionHandler(Exception.class)
public ResponseEntity<ApiErrorReponse> handleException(HttpServletRequest request, Exception ex) {
logError(ex);
String path = request.getRequestURI();
HttpStatus status = HttpStatus.INTERNAL_SERVER_ERROR;
return ResponseEntity.status(status).body(new ApiErrorReponse(OffsetDateTime.now(), status.value(), status.getReasonPhrase(),
"An unexpected error occurred", path));
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,15 @@
import jakarta.servlet.ServletException;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.http.HttpStatus;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.util.StringUtils;
import org.springframework.web.filter.OncePerRequestFilter;

import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.security.interfaces.RSAPublicKey;
import java.util.ArrayList;
import java.util.List;
import org.springframework.http.HttpStatus;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.util.StringUtils;
import org.springframework.web.filter.OncePerRequestFilter;

/**
* This class extends OncePerRequestFilter to provide a filter that decodes and verifies JWT tokens.
Expand Down Expand Up @@ -83,6 +81,7 @@ public void doFilterInternal(HttpServletRequest request, HttpServletResponse res
String lastName;
String email;
String oid;
String studentnumber;

String version = jwt.getClaim("ver").asString();

Expand All @@ -92,21 +91,21 @@ public void doFilterInternal(HttpServletRequest request, HttpServletResponse res
lastName = jwt.getClaim("family_name").asString();
email = jwt.getClaim("unique_name").asString();
oid = jwt.getClaim("oid").asString();
studentnumber = jwt.getClaim("ugentStudentID").asString();
} else if (version.startsWith("2.0")) {
displayName = jwt.getClaim("name").asString();
lastName = jwt.getClaim("surname").asString();
firstName = displayName.replace(lastName, "").strip();
email = jwt.getClaim("mail").asString();
oid = jwt.getClaim("oid").asString();
studentnumber = jwt.getClaim("ugentStudentID").asString();
} else {
throw new JwkException("Invalid OAuth version");
}
// print full object
// logger.info(jwt.getClaims());


logger.info(jwt.getClaims());

User user = new User(displayName, firstName,lastName, email, oid);
User user = new User(displayName, firstName,lastName, email, oid, studentnumber);

Auth authUser = new Auth(user, new ArrayList<>());
SecurityContextHolder.getContext().setAuthentication(authUser);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.ugent.pidgeon.auth;

import com.ugent.pidgeon.postgre.models.types.UserRole;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
Expand Down
Loading
Loading