-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: skillLab integration #52
base: main
Are you sure you want to change the base?
Conversation
4624194
to
208ad38
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! 🥇
We should add a small README to the module folder and include that architecture diagram, I think. It took me a little while until I understood the purpose of the various consumers and use cases - seeing the rough overall architecture would probably help navigate this more easily.
Otherwise code looks very clean and simple to me.
.../main/kotlin/com/aamdigital/aambackendservice/reporting/changes/repository/SyncRepository.kt
Show resolved
Hide resolved
.filter { it.startsWith("aam_") } | ||
.map { | ||
SimpleGrantedAuthority("ROLE_$it") | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am a bit lost here, looking at this as a new dev. Do we have any description about how the roles are used and mapped for us?
Is the "aam_" added internally or already do be defined in the Keycloak roles?
How to use the @PreAuthorize("hasAuthority('ROLE_aam_skill_admin')")
in the following files: which parts are hard prefixes and which ones the name of the role in Keycloak? (Maybe we could have one annotation to check exactly against a keycloak role name to make this easier to understand?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"aam_skill_admin" is the name of the role in the token and in Keycloak. The "ROLE_" prefix is an spring boot convention, not really necessary.
...ce/src/main/kotlin/com/aamdigital/aambackendservice/skill/controller/SkillAdminController.kt
Show resolved
Hide resolved
...rc/main/kotlin/com/aamdigital/aambackendservice/skill/skilllab/SkillLabUserProfileMatcher.kt
Outdated
Show resolved
Hide resolved
...in/kotlin/com/aamdigital/aambackendservice/skill/repository/SkillLabUserProfileSyncEntity.kt
Show resolved
Hide resolved
...in/kotlin/com/aamdigital/aambackendservice/skill/repository/SkillLabUserProfileRepository.kt
Outdated
Show resolved
Hide resolved
...c/main/kotlin/com/aamdigital/aambackendservice/skill/repository/SkillLabUserProfileEntity.kt
Outdated
Show resolved
Hide resolved
...-backend-service/src/main/kotlin/com/aamdigital/aambackendservice/skill/job/SyncSkillsJob.kt
Show resolved
Hide resolved
application/aam-backend-service/src/main/resources/application.yaml
Outdated
Show resolved
Hide resolved
...e/src/main/kotlin/com/aamdigital/aambackendservice/skill/core/SqlSearchUserProfileUseCase.kt
Outdated
Show resolved
Hide resolved
return asSuccessResponse(searchResults) | ||
} | ||
|
||
val searchNames = listOf(nameParts.first(), nameParts.last()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not iterate every name part (including middle names, etc.)?
...ce/src/main/kotlin/com/aamdigital/aambackendservice/skill/controller/SkillAdminController.kt
Outdated
Show resolved
Hide resolved
52d21c3
to
d9ba26e
Compare
fix: ObjectMapperConfiguration fix: fallback for SkillUsage Enum fix: pr feedback docs: draft skill.md Update application/aam-backend-service/src/main/resources/application.yaml Co-authored-by: Sebastian <[email protected]> Update application/aam-backend-service/src/main/kotlin/com/aamdigital/aambackendservice/skill/controller/SkillAdminController.kt Co-authored-by: Sebastian <[email protected]> Update application/aam-backend-service/src/main/kotlin/com/aamdigital/aambackendservice/skill/core/SqlSearchUserProfileUseCase.kt Co-authored-by: Sebastian <[email protected]> fix: di relicts fix: pr feedback and some tests feat: pagination for search results feat: protect endpoints and conditional configuration feat: skillLab admin api feat: improve user profile search fix: default query params and escoUri feat: at user-profile/id endpoint feat: add skill module with skill-api ci: dont trigger on main pushes docs: add skill-api-v1.yaml ci: add publish script for external-mock-service fix: use correct dto for skillab api feat: add external-mocks-application with skilllab mock
d9ba26e
to
6173e87
Compare
No description provided.