Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/943 tenant via iss #946

Closed
wants to merge 310 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
310 commits
Select commit Hold shift + click to select a range
517f06c
Clean up code
Jan 10, 2024
2ef0997
#705 manual merge corrections
Jan 10, 2024
5532f75
#705 - Make max-height of autocomplete bigger in teams- and member se…
Jan 10, 2024
f4c9948
#705 - Make max-height of autocomplete bigger in teams- and member se…
Jan 10, 2024
3510e57
#705 Add missing translations
Jan 10, 2024
4d9ee9b
#705 Sort filtered suggestions by position of search text within it
Jan 10, 2024
1106f1f
#705 Add unit tests for search-team-management.component
Jan 10, 2024
ca6e0f7
[FM] Automated formating frontend
actions-user Jan 10, 2024
20f622b
#705 Fix routing in team management and fix tests
Jan 10, 2024
dfd7aa5
[FM] Automated formating frontend
actions-user Jan 10, 2024
fc5ff6e
#704 Add interceptor in cypress. Add missing ALTER SEQUENCE definitio…
Jan 12, 2024
d7633d8
#704 Add interceptor in cypress. Add missing ALTER SEQUENCE definitio…
Jan 12, 2024
70509e5
#704 Add missing package-l
Jan 15, 2024
04d48ac
#704 Add better handling when user clicks on search result. Preselect…
Jan 15, 2024
a04031c
#704 Remove only focus on cy tests
Jan 15, 2024
341218a
#704 add more tests for frontend
janikEndtner Jan 15, 2024
d2285fa
#704 fix some other warnings in angular tests
janikEndtner Jan 16, 2024
99b0257
#704 Fix overview component and team-management component
Jan 16, 2024
3a812b6
#704 Add missing flex in keyresult-detail.component
Jan 16, 2024
df4b4ca
#704 fix member-list component
janikEndtner Jan 16, 2024
b6505e1
Merge remote-tracking branch 'origin/feature/704-mkaeser_search' into…
janikEndtner Jan 16, 2024
941a015
#704 add cypress tests
janikEndtner Jan 18, 2024
b1db0f9
Merge remote-tracking branch 'origin/main' into 704_benutzerverwaltung
janikEndtner Jan 19, 2024
480b805
#704 reload current user when adding, deleting or updating a team
janikEndtner Jan 19, 2024
a8130e6
#704 fix tests
janikEndtner Jan 19, 2024
602c1b4
#704 fix backend tests
janikEndtner Jan 19, 2024
118830a
[FM] Automated formating backend
actions-user Jan 19, 2024
d526eaf
#739 add pagination for member list
janikEndtner Jan 19, 2024
0e142d3
#739 add check to ensure last admin of a team cannot be removed
janikEndtner Jan 22, 2024
2f03c42
#739 add redirects to new detail routes
janikEndtner Jan 22, 2024
477b52e
#739 fix removing team membership
janikEndtner Jan 22, 2024
0a6b02e
#739 mobile design for member-list header and team-management-banner
janikEndtner Jan 22, 2024
bd8981a
#739 add dropdowns and search bar on mobile view
janikEndtner Jan 22, 2024
0e35461
#739 extract members-table to own component
janikEndtner Jan 22, 2024
5e24ef7
#739 create component to display members on mobile
janikEndtner Jan 22, 2024
74e1c73
#704 backend fixes from review
janikEndtner Jan 23, 2024
8256b5c
#704 frontend fixes from review
janikEndtner Jan 23, 2024
21cf9a9
#704 frontend fixes from review
janikEndtner Jan 23, 2024
7caf004
[FM] Automated formating frontend
actions-user Jan 23, 2024
5c82c78
Merge remote-tracking branch 'origin/704_benutzerverwaltung' into 704…
janikEndtner Jan 23, 2024
3f193c6
#704 - Fix resetting filteredUsers when no search value is provided
Jan 24, 2024
c442495
#704 - Redirect user to team/user page if he is assigned to a team
Jan 24, 2024
4e05238
#704 - Fix unit test
Jan 24, 2024
966e1e3
#704 - Fix issue with bundle size
Jan 24, 2024
1e4f7de
#704 - Add missing injectable annotation
Jan 24, 2024
cd2cc45
#704 - Fix integration tests
Jan 24, 2024
c44639d
#704 - Fix integration tests
Jan 24, 2024
0ffdd89
#704 - Fix cypress test checkIn.cy.ts
Jan 24, 2024
c55bf40
#704 - Fix cypress test checkIn.cy.ts
Jan 24, 2024
03dff7c
#704 - Fix cypress test overview.cy.ts
Jan 24, 2024
adff493
#739 add button to close sidenav in member-detail
janikEndtner Jan 24, 2024
520ed9e
#739 hide remove user button in menu
janikEndtner Jan 24, 2024
8862b58
#739 remove paginator again
janikEndtner Jan 24, 2024
4eefcc0
#704 - Fix cypress tests
Jan 25, 2024
591d9b5
#739 add column to display okr champion
janikEndtner Jan 25, 2024
f135c30
#704 fix tab.cy and team.cy tests
janikEndtner Jan 25, 2024
99c2a46
#704 fix margin of p elements
janikEndtner Jan 25, 2024
0fb86c6
Merge branch '704_benutzerverwaltung' into 739_benutzer-details
janikEndtner Jan 25, 2024
395a806
#739 use homogeneous headers and icons in team-management and other o…
janikEndtner Jan 25, 2024
498f78a
#739 extract showEditRole component and use it on member-list-table
janikEndtner Jan 26, 2024
7a1d8d3
#739 auto format
janikEndtner Jan 26, 2024
e5e0699
[FM] Automated formating backend
actions-user Jan 26, 2024
f756787
#739 create backend method to set okr champion
janikEndtner Jan 26, 2024
430edb5
#739 create component to edit okr champion.
janikEndtner Jan 26, 2024
529c022
#739 fix cypress tests and add some for setting okr champion and user…
janikEndtner Jan 26, 2024
10a1e7d
Merge remote-tracking branch 'origin/739_benutzer-details' into 739_b…
janikEndtner Jan 26, 2024
3aac5dc
[FM] Automated formating backend
actions-user Jan 26, 2024
666cf53
#739 check if at least one OKR Champion exists
janikEndtner Jan 26, 2024
e37a84c
Merge remote-tracking branch 'origin/739_benutzer-details' into 739_b…
janikEndtner Jan 26, 2024
6bc9084
[FM] Automated formating backend
actions-user Jan 26, 2024
d8b4118
#739 check that one team admin exists when changing role from admin t…
janikEndtner Jan 29, 2024
ccb4442
#739 add dialogs before deleting team or team membership
janikEndtner Jan 29, 2024
a703e23
Merge remote-tracking branch 'origin/739_benutzer-details' into 739_b…
janikEndtner Jan 29, 2024
67de698
[FM] Automated formating backend
actions-user Jan 29, 2024
04cb01b
#739 reload all entities correctly when updating roles
janikEndtner Jan 29, 2024
901df07
Merge remote-tracking branch 'origin/739_benutzer-details' into 739_b…
janikEndtner Jan 29, 2024
f424245
#704 set okr champion from application properties in registrationServ…
janikEndtner Jan 29, 2024
8b9a41c
[FM] Automated formating backend
actions-user Jan 29, 2024
e24486c
#704 fix button margins and remove unnecessary properties from applic…
janikEndtner Jan 29, 2024
5652cf2
Merge remote-tracking branch 'origin/704_benutzerverwaltung' into 704…
janikEndtner Jan 29, 2024
f12c5f2
#704 - Stay on the current team-management page / or sub page when cl…
Jan 29, 2024
8e4fae8
Merge remote-tracking branch 'origin/704_benutzerverwaltung' into 704…
Jan 29, 2024
4543647
#704 - Fix unit test
Jan 29, 2024
19a7fbf
#704 - Fix issue with sequence_person_team in dev-db
Jan 29, 2024
05f06c7
#704 update first- and lastname from jwt token
janikEndtner Jan 29, 2024
fa9dc99
Merge remote-tracking branch 'origin/704_benutzerverwaltung' into 704…
janikEndtner Jan 29, 2024
cf20c1e
#704 hide or disable button add to team
janikEndtner Jan 29, 2024
bd6a0da
#704 fix test
janikEndtner Jan 29, 2024
f151e85
#739 hide or disable button add to team
janikEndtner Jan 29, 2024
721d6c0
Merge remote-tracking branch 'origin/739_benutzer-details' into 739_b…
janikEndtner Jan 29, 2024
7227d4a
Merge branch 'main' into 704_benutzerverwaltung
janikEndtner Jan 29, 2024
6a161a7
#704 fix issues after merge
janikEndtner Jan 29, 2024
8e4adab
[FM] Automated formating frontend
actions-user Jan 29, 2024
8fbc48e
#704 fix cypress tests after merge
janikEndtner Jan 29, 2024
d070849
Merge remote-tracking branch 'origin/704_benutzerverwaltung' into 704…
janikEndtner Jan 29, 2024
f8a7886
Merge branch '704_benutzerverwaltung' into 739_benutzer-details
janikEndtner Jan 29, 2024
87377e8
#704 - Fix issue with cypress interception of @keyresults
Jan 29, 2024
29e80bb
#704 - Fix issue with cypress interception of @keyresults
Jan 29, 2024
830f664
#739 change add team from textarea to input field
janikEndtner Jan 30, 2024
150478d
[FM] Automated formating backend
actions-user Jan 30, 2024
0f65754
#704 - Fix cypress tests
Jan 30, 2024
c0fca65
#739 members should be able to add objectives and key-results too
janikEndtner Jan 30, 2024
05ce68c
Merge remote-tracking branch 'origin/739_benutzer-details' into 739_b…
janikEndtner Jan 30, 2024
59665ee
[FM] Automated formating backend
actions-user Jan 30, 2024
085018a
Merge branch '704_benutzerverwaltung' into 739_benutzer-details
janikEndtner Jan 30, 2024
ab40f04
Merge remote-tracking branch 'origin/739_benutzer-details' into 739_b…
janikEndtner Jan 30, 2024
930e30d
Merge pull request #758 from puzzle/704_benutzerverwaltung
Makae Jan 30, 2024
82efe0e
#739 fix tests
janikEndtner Jan 30, 2024
7ed4f4d
#739 fix tests
janikEndtner Jan 30, 2024
cf6171e
#739 changes from review
janikEndtner Jan 30, 2024
cdad6d5
Merge pull request #784 from puzzle/739_benutzer-details
Makae Jan 31, 2024
9d2b481
#752 - Change local-dev keycloak to have 2 realms for 2 different cus…
Jan 16, 2024
3ff19ad
#752 - WIP - Trying to add different issuer location, based on tenant
Jan 17, 2024
4665871
[FM] Automated formating backend
actions-user Jan 17, 2024
27a425e
#752 - Complete iss claim validation and Spring security changes for …
Jan 17, 2024
ba6d7a6
[FM] Automated formating backend
actions-user Jan 17, 2024
4ed89ce
#752 - Introduce JwtHelper for reading out tenantId from issuer. Addi…
Jan 17, 2024
fa69d47
[FM] Automated formating backend
actions-user Jan 17, 2024
97ab4df
#752 - WIP - Change to support multiple data sources
Jan 17, 2024
97b71b2
[FM] Automated formating backend
actions-user Jan 17, 2024
491b7b3
#752 - WIP - Multitenancy
Jan 19, 2024
b2bbd21
#752 - WIP - Multitenancy
Jan 19, 2024
9d51cd7
#752 - WIP - Multitenancy
Jan 22, 2024
fbfa96d
#752 - Manual merge after rebase onto 704_Benutzerverwaltung
Jan 23, 2024
05cd5dd
#752 - Switch to single realm, multi client config with specific clie…
Jan 23, 2024
deee576
[FM] Automated formating backend
actions-user Jan 23, 2024
c4ee853
#704 - Add missing methods
Jan 29, 2024
16e0103
[FM] Automated formating backend
actions-user Jan 29, 2024
f1c0cc8
#752 - Manual corrections after rebase
Jan 31, 2024
7e6e481
[FM] Automated formating backend
actions-user Jan 31, 2024
87ca431
#790 create dialog to invite members
janikEndtner Feb 2, 2024
13cbb67
[FM] Automated formating frontend
actions-user Feb 2, 2024
4e03df3
#790 format
janikEndtner Feb 2, 2024
6927b65
#790 create backend methods to create users
janikEndtner Feb 2, 2024
b31995c
#790 call backend when creating users
janikEndtner Feb 2, 2024
540b106
Merge remote-tracking branch 'origin/feature/790_members_einladen' in…
janikEndtner Feb 2, 2024
e411790
[FM] Automated formating backend
actions-user Feb 2, 2024
74a46a3
#790 add cypress tests
janikEndtner Feb 2, 2024
3f0019b
Merge remote-tracking branch 'origin/feature/790_members_einladen' in…
janikEndtner Feb 2, 2024
edcbf1c
#790 fix frontend tests
janikEndtner Feb 2, 2024
e3acf21
#790 fix column width of new-user columns
janikEndtner Feb 2, 2024
fa0a36a
#789 some details from testing
janikEndtner Feb 2, 2024
c29c55b
#789 fix cypress tests
janikEndtner Feb 5, 2024
2b5040a
#752 - Fix PR comments
Mar 5, 2024
bc0bbfa
[FM] Automated formating backend
actions-user Mar 5, 2024
9c41427
#752 - move exception to its package to be compliant with ArchUnit rules
pizzi-cato Mar 5, 2024
cd4beac
#790 some minor changes from review
janikEndtner Apr 9, 2024
84e8239
add "GJ 23/24-Q4" in H2 Test Data
clean-coder Apr 12, 2024
2b0476a
fix backend tests
clean-coder Apr 12, 2024
e281ca8
#790 change form to reactiveForm for better validation
janikEndtner Apr 12, 2024
6cda594
#789 remove print statement
janikEndtner Apr 12, 2024
9b0efbe
[FM] Automated formating frontend
actions-user Apr 12, 2024
df79f35
Merge pull request #795 from puzzle/feature/789_korrekturen_testing
janikEndtner Apr 12, 2024
fcf123a
additional setup/teardown code for persistence tests
clean-coder Apr 12, 2024
d5fb5e4
test for UserKeyGeneratorTest
clean-coder Apr 12, 2024
11a94f4
minor code cleanup in multitenancy package
clean-coder Apr 12, 2024
57fcf1a
[FM] Automated formating frontend
actions-user Apr 12, 2024
b42d808
#790 fix frontend unit tests
janikEndtner Apr 12, 2024
e04fea1
Merge remote-tracking branch 'origin/feature/790_members_einladen' in…
janikEndtner Apr 12, 2024
15c1024
[FM] Automated formating frontend
actions-user Apr 12, 2024
b081bfe
#790 improve email validation
janikEndtner Apr 12, 2024
b609505
#790 fix padding in input fields
janikEndtner Apr 12, 2024
ed8655f
Merge remote-tracking branch 'origin/feature/790_members_einladen' in…
janikEndtner Apr 12, 2024
7d1f7e9
fix flaky test
clean-coder Apr 15, 2024
fc4ab1b
fix cypress setup for multi-tenant
clean-coder Apr 15, 2024
d4a0001
skip 2 tests (which are red for me)
clean-coder Apr 15, 2024
ace8bcf
update keycloak to v24.0.2 (version in main)
clean-coder Apr 15, 2024
4f7f518
update cypress url for e2e tests on server
clean-coder Apr 16, 2024
3a2adc3
update cypress url for e2e tests on server
clean-coder Apr 16, 2024
14f9ee0
update cypress url for e2e tests on server
clean-coder Apr 16, 2024
c4e76a9
update cypress url for e2e tests on server
clean-coder Apr 16, 2024
238c4f3
update cypress url for e2e tests on server
clean-coder Apr 16, 2024
bade0aa
update cypress url for e2e tests on server
clean-coder Apr 16, 2024
78b7dba
Merge remote-tracking branch 'origin/multitenancy_main' into 752-mult…
Apr 17, 2024
88644fa
update cypress url for e2e tests on server
clean-coder Apr 18, 2024
9e4baad
update cypress url for e2e tests on server
clean-coder Apr 18, 2024
cb7e45e
update cypress url for e2e tests on server
clean-coder Apr 18, 2024
c429b50
update cypress url for e2e tests on server
clean-coder Apr 18, 2024
6458499
update cypress url for e2e tests on server 1
clean-coder Apr 18, 2024
de8ff93
update cypress url for e2e tests on server 2
clean-coder Apr 18, 2024
36ad3ad
update cypress url for e2e tests on server 3
clean-coder Apr 18, 2024
0f2ba30
update cypress url for e2e tests on server 4
clean-coder Apr 18, 2024
232571b
update cypress url for e2e tests on server 5
clean-coder Apr 18, 2024
5c18d1c
update cypress url for e2e tests on server 6
clean-coder Apr 18, 2024
f0bc6f3
update cypress url for e2e tests on server 7
clean-coder Apr 18, 2024
80e1747
update cypress url for e2e tests on server mix 1
clean-coder Apr 18, 2024
c9fd153
update cypress url for e2e tests on server mix 2
clean-coder Apr 18, 2024
1696ba5
update cypress url for e2e tests on server mix 3
clean-coder Apr 18, 2024
90d0ee5
update cypress url for e2e tests on server reset
clean-coder Apr 18, 2024
361d011
for each Tenant a separate DB User
clean-coder Apr 19, 2024
d63508b
ersetzen von *-template properties durch fix definierte properties pr…
clean-coder Apr 22, 2024
7ff7cdf
Testing core functionality "set schema" of AbstractSchemaMultiTenantC…
clean-coder Apr 22, 2024
53533b3
Merge branch 'main' into multitenancy_main
Apr 23, 2024
58c4b9a
Manual merge
Apr 23, 2024
76dc894
Merge remote-tracking branch 'origin/multitenancy_main' into 752-mult…
Apr 23, 2024
cdaaf6e
Manual merge
Apr 23, 2024
ea8ca94
Manual merge
Apr 23, 2024
5b6ca93
Merge remote-tracking branch 'origin/752-multi-tenant-keycloak-setup'…
Apr 23, 2024
7b50bbc
[FM] Automated formating backend
actions-user Apr 23, 2024
31f9596
Correct code style
Apr 23, 2024
3056d8b
Remove test, was moved
Apr 23, 2024
c442423
Fix test
Apr 23, 2024
088f785
Merge remote-tracking branch 'origin/multitenancy_main' into feature/…
janikEndtner Apr 26, 2024
c3a885e
fix tests after merge
janikEndtner Apr 30, 2024
45c3b36
fix tests after merge
janikEndtner Apr 30, 2024
5f817d4
[FM] Automated formating frontend
actions-user Apr 30, 2024
0102c03
Merge remote-tracking branch 'origin/main' into multitenancy_main
janikEndtner Apr 30, 2024
59d6025
Merge remote-tracking branch 'origin/multitenancy_main' into multiten…
janikEndtner Apr 30, 2024
db25f7c
change wait-on urls to correct subdomains
janikEndtner May 6, 2024
2583101
renamed last V2 scripts to V3
clean-coder May 7, 2024
53c557d
temp solution to add valid data to the quarter table (otherwise the s…
clean-coder May 7, 2024
640ad9e
save cypress print screens to GitHub runner artifacts
janikEndtner May 10, 2024
5f01811
use correct realm-export and version in keycloak
janikEndtner May 10, 2024
fa68817
fix: User objects are cached with email as key which does not work fo…
clean-coder May 14, 2024
18a3a49
refactoring: extract business logic into UserUpdateHelper class for e…
clean-coder May 14, 2024
98335e5
enable and fix AuthorizationRegistrationService IntegrationTest
clean-coder May 14, 2024
d39e55e
temp: disable all Tests in AuthorizationRegistrationServiceIT
clean-coder May 15, 2024
d791b5b
temp: enable 1 Test in AuthorizationRegistrationServiceIT
clean-coder May 15, 2024
38152ad
temp: enable 1 Test in AuthorizationRegistrationServiceIT
clean-coder May 15, 2024
48e26bc
fix in AuthorizationRegistrationServiceIT
clean-coder May 15, 2024
ee6528d
fix in AuthorizationRegistrationServiceIT
clean-coder May 15, 2024
2e86df2
Merge branch '752-multi-tenant-keycloak-setup' into multitenancy_main
clean-coder May 15, 2024
f198972
minor code formatting
clean-coder May 15, 2024
7f86c70
Merge branch 'multitenancy_main' into feature/790_members_einladen
janikEndtner May 17, 2024
419b424
#790 fix test error messages
janikEndtner May 17, 2024
ed437d3
tests for mapper package with 100% line coverage
clean-coder May 24, 2024
e96eb30
okr #914: tests for multitenancy package
clean-coder May 28, 2024
895ab08
okr #914: fix CurrentTenantIdentifierResolverImplTest
clean-coder May 28, 2024
3443be4
okr #914: cleanup - manual formatting of fluent API calls
clean-coder May 28, 2024
d2caa33
Merge pull request #793 from puzzle/feature/790_members_einladen
janikEndtner May 31, 2024
67d2c12
okr #914: tests for security package
clean-coder Jun 3, 2024
0c5397a
okr #914: cleanup - rename variables + manual code formatting
clean-coder Jun 3, 2024
251c74b
okr #914: cleanup - manual code formatting
clean-coder Jun 3, 2024
4ec64c4
okr #914: add mapping for createOn/modifiedOn in CheckInX Classes
clean-coder Jun 3, 2024
77d167b
okr #914: rename in CheckInOrdinalDto: value to zone
clean-coder Jun 3, 2024
7dfbc43
okr #914: add mapping for createOn in KeyResultX Mapper Classes + man…
clean-coder Jun 3, 2024
b03fe8e
okr #914: rename toKeyResultMetricDto() and toKeyResultOrdinalDto() t…
clean-coder Jun 3, 2024
7d499b7
okr #914: remove "TODO immer false"
clean-coder Jun 3, 2024
4877a24
okr #914: rename in KeyResultLastCheckInOrdinalDto value to zone
clean-coder Jun 3, 2024
eadf53b
okr #914: add createdOn() to KeyResultOrdinalMapper
clean-coder Jun 3, 2024
b4fca2f
okr #914: include mapper package in jacoco
clean-coder Jun 3, 2024
75c6678
okr #914: Rückbau CheckInOrdinalDto zone->value wegen Client DTO Komp…
clean-coder Jun 4, 2024
69ef68a
okr #914: Rückbau KeyResultLastCheckInOrdinalDto zone->value wegen Cl…
clean-coder Jun 4, 2024
41a852e
#943: keycloak export of pitc without tenant claim mapper
clean-coder Jun 14, 2024
f1fb128
#943: minor code cleanup for readability
clean-coder Jun 14, 2024
3a783d5
#943: helper classes for getting tenant from Token/ClaimSet using ten…
clean-coder Jun 14, 2024
b90bcdf
#943: use helper classes in JwtHelper
clean-coder Jun 14, 2024
1e53d4a
#943: tests for helper classes
clean-coder Jun 14, 2024
ddd504d
[FM] Automated formating backend
actions-user Jun 14, 2024
2a92f6d
#943: adopt functional programming style for helper classes
clean-coder Jun 14, 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
  •  
  •  
  •  
12 changes: 9 additions & 3 deletions .github/workflows/frontend-test-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ jobs:
--name my_keycloak \
-e KEYCLOAK_ADMIN=admin \
-e KEYCLOAK_ADMIN_PASSWORD=keycloak \
-v ./docker/config/realm-export.json:/opt/keycloak/data/import/realm.json \
-v ./docker/config/realm-export-pitc.json:/opt/keycloak/data/import/realm-pitc.json \
-p 8544:8080 \
quay.io/keycloak/keycloak:23.0.1 \
quay.io/keycloak/keycloak:24.0.2 \
start-dev --import-realm

- name: start backend
Expand All @@ -58,10 +58,16 @@ jobs:
with:
working-directory: frontend
start: npm start
wait-on: 'http://localhost:8080/config, http://localhost:4200, http://localhost:8544'
wait-on: 'http://pitc.okr.localhost:8080/config, http://pitc.okr.localhost:4200, http://localhost:8544'
wait-on-timeout: 120
browser: chrome
headed: true

- uses: actions/upload-artifact@v4
if: always()
with:
name: cypress-screenshots
path: frontend/cypress/screenshots

- name: remove docker containers
run: docker ps -aq | xargs -r docker rm -f
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ sonar-project.properties
/frontend/cypress/downloads/
/frontend/cypress/screenshots/
/toolchains.xml
/backend/src/main/resources/db/okr_schema.sql
2 changes: 1 addition & 1 deletion .run/OkrApplication-E2E.run.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="OkrApplication-E2E" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot">
<option name="ACTIVE_PROFILES" value="integration-test" />
<option name="ALTERNATIVE_JRE_PATH" value="$USER_HOME$/.sdkman/candidates/java/current" />
<option name="ALTERNATIVE_JRE_PATH" value="$USER_HOME$/.jdks/corretto-17.0.9" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="true" />
<module name="backend" />
<option name="SPRING_BOOT_MAIN_CLASS" value="ch.puzzle.okr.OkrApplication" />
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,17 @@ This is an open source application for managing OKRs, developed by the team of a

This project contains two parts:

## Setup
Add subdomains to hosts file:
```shell
sudo sh -c 'echo "127.0.0.1 pitc.okr.localhost\n127.0.0.1 acme.okr.localhost" >> /etc/hosts'
```

## Frontend

[Frontend description](frontend/README.md)


## Backend
[Backend description](backend/README.md)

Expand Down
1 change: 0 additions & 1 deletion backend/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@
<excludes>
<exclude>ch/puzzle/okr/models/**</exclude>
<exclude>ch/puzzle/okr/dto/**</exclude>
<exclude>ch/puzzle/okr/mapper/**</exclude>
<exclude>ch/puzzle/okr/OkrApplication.*</exclude>
<exclude>ch/puzzle/okr/Constants.java</exclude>
<exclude>ch/puzzle/okr/ErrorKey.java</exclude>
Expand Down
1 change: 1 addition & 0 deletions backend/src/main/java/ch/puzzle/okr/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ private Constants() {
public static final String QUARTER = "Quarter";
public static final String TEAM = "Team";
public static final String USER = "User";
public static final String USER_TEAM = "UserTeam";
}
2 changes: 1 addition & 1 deletion backend/src/main/java/ch/puzzle/okr/ErrorKey.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ public enum ErrorKey {
ATTRIBUTE_NULL, ATTRIBUTE_CHANGED, ATTRIBUTE_SET_FORBIDDEN, ATTRIBUTE_NOT_SET, ATTRIBUTE_CANNOT_CHANGE,
ATTRIBUTE_MUST_BE_DRAFT, KEY_RESULT_CONVERSION, ALREADY_EXISTS_SAME_NAME, CONVERT_TOKEN, DATA_HAS_BEEN_UPDATED,
MODEL_NULL, MODEL_WITH_ID_NOT_FOUND, NOT_AUTHORIZED_TO_READ, NOT_AUTHORIZED_TO_WRITE, NOT_AUTHORIZED_TO_DELETE,
TOKEN_NULL
TOKEN_NULL, TRIED_TO_DELETE_LAST_ADMIN, TRIED_TO_REMOVE_LAST_OKR_CHAMPION
}
22 changes: 22 additions & 0 deletions backend/src/main/java/ch/puzzle/okr/FlywayMultitenantConfig.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package ch.puzzle.okr;

import ch.puzzle.okr.multitenancy.FlywayMultitenantMigrationInitializer;
import org.springframework.boot.autoconfigure.flyway.FlywayMigrationStrategy;
import org.springframework.cache.interceptor.KeyGenerator;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class FlywayMultitenantConfig {

@Bean
public FlywayMigrationStrategy cleanMigrateStrategy(FlywayMultitenantMigrationInitializer flywayMigration) {
return flyway -> flywayMigration.migrateFlyway();
}

@Bean("customKeyGenerator")
public KeyGenerator keyGenerator() {
return new UserKeyGenerator();
}

}
2 changes: 1 addition & 1 deletion backend/src/main/java/ch/puzzle/okr/OkrApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import ch.puzzle.okr.service.clientconfig.ClientCustomizationProperties;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.boot.context.properties.EnableConfigurationProperties;

@SpringBootApplication
@EnableScheduling
Expand Down
37 changes: 37 additions & 0 deletions backend/src/main/java/ch/puzzle/okr/SecurityConfig.java
Original file line number Diff line number Diff line change
@@ -1,16 +1,30 @@
package ch.puzzle.okr;

import com.nimbusds.jose.proc.SecurityContext;
import com.nimbusds.jwt.proc.ConfigurableJWTProcessor;
import com.nimbusds.jwt.proc.DefaultJWTProcessor;
import com.nimbusds.jwt.proc.JWTClaimsSetAwareJWSKeySelector;
import com.nimbusds.jwt.proc.JWTProcessor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.annotation.Order;
import org.springframework.http.HttpStatus;
import org.springframework.security.authentication.AuthenticationEventPublisher;
import org.springframework.security.authentication.DefaultAuthenticationEventPublisher;
import org.springframework.security.config.Customizer;
import org.springframework.security.config.annotation.method.configuration.EnableMethodSecurity;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configurers.HeadersConfigurer;
import org.springframework.security.oauth2.core.DelegatingOAuth2TokenValidator;
import org.springframework.security.oauth2.core.OAuth2TokenValidator;
import org.springframework.security.oauth2.jwt.Jwt;
import org.springframework.security.oauth2.jwt.JwtDecoder;
import org.springframework.security.oauth2.jwt.JwtValidators;
import org.springframework.security.oauth2.jwt.NimbusJwtDecoder;
import org.springframework.security.web.SecurityFilterChain;
import org.springframework.security.web.authentication.HttpStatusEntryPoint;
import org.springframework.security.web.authentication.www.BasicAuthenticationFilter;
Expand Down Expand Up @@ -41,6 +55,22 @@ public SecurityFilterChain securityHeadersFilter(HttpSecurity http) throws Excep
return setHeaders(http).build();
}

@Bean
JWTProcessor<SecurityContext> jwtProcessor(JWTClaimsSetAwareJWSKeySelector<SecurityContext> keySelector) {
ConfigurableJWTProcessor<SecurityContext> jwtProcessor = new DefaultJWTProcessor<>();
jwtProcessor.setJWTClaimsSetAwareJWSKeySelector(keySelector);
return jwtProcessor;
}

@Bean
JwtDecoder jwtDecoder(JWTProcessor<SecurityContext> jwtProcessor, OAuth2TokenValidator<Jwt> jwtValidator) {
NimbusJwtDecoder decoder = new NimbusJwtDecoder(jwtProcessor);
OAuth2TokenValidator<Jwt> validator = new DelegatingOAuth2TokenValidator<>(JwtValidators.createDefault(),
jwtValidator);
decoder.setJwtValidator(validator);
return decoder;
}

private HttpSecurity setHeaders(HttpSecurity http) throws Exception {
http.headers(h -> h
.contentSecurityPolicy(e -> e.policyDirectives("default-src 'self';"
Expand Down Expand Up @@ -69,4 +99,11 @@ private HttpSecurity setHeaders(HttpSecurity http) throws Exception {
+ " publickey-credentials-get=(), screen-wake-lock=(), sync-xhr=(self), "
+ "usb=(), web-share=(), xr-spatial-tracking=()")));
}

@Bean
public AuthenticationEventPublisher authenticationEventPublisher(
ApplicationEventPublisher applicationEventPublisher) {
return new DefaultAuthenticationEventPublisher(applicationEventPublisher);
}

}
9 changes: 7 additions & 2 deletions backend/src/main/java/ch/puzzle/okr/SpringCachingConfig.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package ch.puzzle.okr;

import ch.puzzle.okr.models.User;
import ch.puzzle.okr.multitenancy.TenantContext;
import org.springframework.cache.CacheManager;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cache.concurrent.ConcurrentMapCacheManager;
Expand All @@ -11,10 +13,13 @@
public class SpringCachingConfig {

public static final String AUTHORIZATION_USER_CACHE = "authorizationUsers";
public static final String USER_CACHE = "users";

@Bean
public CacheManager cacheManager() {
return new ConcurrentMapCacheManager(AUTHORIZATION_USER_CACHE, USER_CACHE);
return new ConcurrentMapCacheManager(AUTHORIZATION_USER_CACHE);
}

public static String cacheKey(User user) {
return TenantContext.getCurrentTenant() + "_" + user.getEmail();
}
}
16 changes: 16 additions & 0 deletions backend/src/main/java/ch/puzzle/okr/UserKeyGenerator.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package ch.puzzle.okr;

import ch.puzzle.okr.models.User;
import ch.puzzle.okr.multitenancy.TenantContext;
import org.springframework.cache.interceptor.KeyGenerator;

import java.lang.reflect.Method;
import java.text.MessageFormat;

public class UserKeyGenerator implements KeyGenerator {
@Override
public Object generate(Object target, Method method, Object... params) {
User user = (User) params[0];
return MessageFormat.format("{0}{1}{2}", TenantContext.getCurrentTenant(), user.getEmail(), user.getId());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,6 @@ public void emptyAuthorizationUsersCache() {
cacheService.emptyAuthorizationUsersCache();
}

@Operation(summary = "Delete users cache", description = "Delete users cache")
@ApiResponses(value = { @ApiResponse(responseCode = "200", description = "Users cache deleted") })
@PostMapping("emptyUsersCache")
public void emptyUsersCache() {
cacheService.emptyUsersCache();
}

@Operation(summary = "Delete all caches", description = "Delete all caches")
@ApiResponses(value = { @ApiResponse(responseCode = "200", description = "All caches deleted") })
@PostMapping("emptyAllCaches")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@

import ch.puzzle.okr.dto.ClientConfigDto;
import ch.puzzle.okr.service.clientconfig.ClientConfigService;
import jakarta.servlet.http.HttpServletRequest;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/config")
public class ClientConfigController {
Expand All @@ -19,7 +22,8 @@ public ClientConfigController(ClientConfigService configService) {
}

@GetMapping
public ResponseEntity<ClientConfigDto> getConfig() {
return ResponseEntity.status(HttpStatus.OK).body(configService.getConfigBasedOnActiveEnv());
public ResponseEntity<ClientConfigDto> getConfig(HttpServletRequest request) {
return ResponseEntity.status(HttpStatus.OK)
.body(configService.getConfigBasedOnActiveEnv(request.getServerName()));
}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package ch.puzzle.okr.controller;

import ch.puzzle.okr.dto.overview.DashboardDto;
import ch.puzzle.okr.dto.overview.OverviewDto;
import ch.puzzle.okr.mapper.DashboardMapper;
import ch.puzzle.okr.mapper.OverviewMapper;
import ch.puzzle.okr.service.authorization.OverviewAuthorizationService;
import io.swagger.v3.oas.annotations.Operation;
Expand All @@ -23,14 +21,12 @@
@RequestMapping("api/v2/overview")
public class OverviewController {
private final OverviewMapper overviewMapper;
private final DashboardMapper dashboardMapper;
private final OverviewAuthorizationService overviewAuthorizationService;

public OverviewController(OverviewMapper overviewMapper, OverviewAuthorizationService overviewAuthorizationService,
DashboardMapper dashboardMapper) {
public OverviewController(OverviewMapper overviewMapper,
OverviewAuthorizationService overviewAuthorizationService) {
this.overviewMapper = overviewMapper;
this.overviewAuthorizationService = overviewAuthorizationService;
this.dashboardMapper = dashboardMapper;
}

@Operation(summary = "Get all teams and their objectives", description = "Get a List of teams with their objectives")
Expand All @@ -41,14 +37,11 @@ public OverviewController(OverviewMapper overviewMapper, OverviewAuthorizationSe
@ApiResponse(responseCode = "401", description = "Not authorized to read teams with their objectives", content = @Content),
@ApiResponse(responseCode = "404", description = "The quarter or one of the teams were not found", content = @Content) })
@GetMapping("")
public ResponseEntity<DashboardDto> getOverview(
public ResponseEntity<List<OverviewDto>> getOverview(
@RequestParam(required = false, defaultValue = "", name = "team") List<Long> teamFilter,
@RequestParam(required = false, defaultValue = "", name = "quarter") Long quarterFilter,
@RequestParam(required = false, defaultValue = "", name = "objectiveQuery") String objectiveQuery) {
boolean hasWriteAllAccess = overviewAuthorizationService.hasWriteAllAccess();
return ResponseEntity.status(HttpStatus.OK)
.body(dashboardMapper.toDto(overviewMapper.toDto(
overviewAuthorizationService.getFilteredOverview(quarterFilter, teamFilter, objectiveQuery)),
hasWriteAllAccess));
return ResponseEntity.status(HttpStatus.OK).body(overviewMapper
.toDto(overviewAuthorizationService.getFilteredOverview(quarterFilter, teamFilter, objectiveQuery)));
}
}
Loading
Loading