Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -165,12 +165,12 @@
Per (by) ber om tilgang for Kari (for) til App (resource) hos Org (at).
*/
var result = await requestService.CreateResourceRequest(
toId: to,
fromId: party,
byId: authUserUuid,
toId: to,
fromId: party,
byId: authUserUuid,
roleId: RoleConstants.Rightholder.Id,
resourceId: resourceObj.Id,
status: RequestStatus.Pending,
resourceId: resourceObj.Id,
status: RequestStatus.Pending,
ct: ct
);

Expand Down Expand Up @@ -384,7 +384,7 @@

private async Task<IActionResult> ApproveResourceRequest(Guid partyUuid, Guid authUserId, RequestDto request, IEnumerable<string> rightKeys, CancellationToken ct)
{
var party = await entityService.GetEntity(partyUuid, ct); // valg avgiver

Check warning on line 387 in src/apps/Altinn.AccessManagement/src/Altinn.AccessManagement.Api.Enduser/Controllers/RequestController.cs

View check run for this annotation

SonarQubeCloud / [Authorization Altinn.AccessManagement] SonarCloud Code Analysis

Remove the unused local variable 'party'.

See more on https://sonarcloud.io/project/issues?id=Authorization_AccessManagement&issues=AZ0K-26GO2aXtfkdghVP&open=AZ0K-26GO2aXtfkdghVP&pullRequest=2621

var delegationCheck = await connectionService.ResourceDelegationCheck(
authenticatedUserUuid: authUserId,
Expand All @@ -410,20 +410,21 @@

var from = await entityService.GetEntity(request.From.Id, ct);
var to = await entityService.GetEntity(request.To.Id, ct);
var authUser = await entityService.GetEntity(authUserId, ct);
var resource = await resourceService.GetResource(request.Resource.Id.Value, ct);

var assignment = await assignmentService.GetOrCreateAssignment(from.Id, to.Id, RoleConstants.Rightholder, cancellationToken: ct);
var assignment = await assignmentService.GetOrCreateAssignment(to.Id, from.Id, RoleConstants.Rightholder, cancellationToken: ct);
if (assignment is null)
{
return Problem("Unable to get or create rightholder assignment");
}

var result = await connectionService.AddResource(

Check warning on line 422 in src/apps/Altinn.AccessManagement/src/Altinn.AccessManagement.Api.Enduser/Controllers/RequestController.cs

View check run for this annotation

SonarQubeCloud / [Authorization Altinn.AccessManagement] SonarCloud Code Analysis

Parameters to 'AddResource' have the same names but not the same order as the method arguments.

See more on https://sonarcloud.io/project/issues?id=Authorization_AccessManagement&issues=AZ0K-26FO2aXtfkdghVO&open=AZ0K-26FO2aXtfkdghVO&pullRequest=2621
from,
to,
from,
resource,
new RightKeyListDto { DirectRightKeys = rightKeys },
party,
authUser,
ConfigureConnections,
ct);

Expand Down
Loading