Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Extend authorized parties with instance delegations #856
base: main
Are you sure you want to change the base?
Extend authorized parties with instance delegations #856
Changes from 4 commits
35577ab
a1382a0
528cfff
daff182
c7daa54
929228b
ebbaf08
e585ce8
9a9840a
a1699a9
6ff5fc2
cca465a
102c559
d25262d
85b5c5d
51a5f5d
30429b8
c098ecf
dbc99ff
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Check warning on line 67 in src/Altinn.AccessManagement.Core/Repositories/Interfaces/IDelegationMetadataRepository.cs
GitHub Actions / Analyze
Check warning on line 67 in src/Altinn.AccessManagement.Core/Repositories/Interfaces/IDelegationMetadataRepository.cs
GitHub Actions / Analyze
Check warning on line 188 in src/Altinn.AccessManagement.Core/Services/AppsInstanceDelegationService.cs
GitHub Actions / Analyze
Check warning on line 188 in src/Altinn.AccessManagement.Core/Services/AppsInstanceDelegationService.cs
GitHub Actions / Analyze
Check warning on line 220 in src/Altinn.AccessManagement.Core/Services/AppsInstanceDelegationService.cs
GitHub Actions / Analyze
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.
Det blir vel feil å legge inn en userid i en liste over partyids siden disse ikke brukes likt og ikke har samme verdi en user har en party id men den er ikke lik userid
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.
jaja, var en god del issues med denne logikken. Har skrevet den om nå, ble ganske feil.
Check warning on line 175 in src/Altinn.AccessManagement.Core/Services/AuthorizedPartiesService.cs
GitHub Actions / Analyze
Check warning on line 175 in src/Altinn.AccessManagement.Core/Services/AuthorizedPartiesService.cs
GitHub Actions / Analyze
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.
Vil ikke denne continue blokken medføre at bare nye partyid får lagt til nye instanser om du har flere instanser så er det bare den første som blir lagt til og dersom du har en annen tilgang så blir ingen instanser lagt til siden den allerede ligger i dictionarien.
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.
mm, har skrevet om logikken her.
Check warning on line 54 in src/Altinn.AccessManagement.Integration/Clients/AltinnRolesClient.cs
GitHub Actions / Analyze
Check warning on line 79 in src/Altinn.AccessManagement.Integration/Clients/AltinnRolesClient.cs
GitHub Actions / Analyze
Check warning on line 105 in src/Altinn.AccessManagement.Integration/Clients/AltinnRolesClient.cs
GitHub Actions / Analyze
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.
Samme som JK dersom du ikke har instanceId i group by så vil den slå sammen alle instansene desuten er det vel ikke mulig å bruke en group by og hente ut alle kolonner for de kolenne som ikke er grupert på vil kunne være mange verdier så de må ha en agregate funksjon for å finne hvilken som skal brukes. Jeg ville brukt Common table expression her og grupere på de dataene som var viktige og så hente ut max(instancedelegationchangeid) og deretter joine med denne common table expressionen med tabellen på nytt med id som match så ville jeg få ut alle siste endringer.
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.
stemmer, templating før jeg fikk testet spørringen. Endret på spørringen nu