Skip to content

Commit

Permalink
Set default altinn version handling for all users - not only service …
Browse files Browse the repository at this point in the history
…owners. (#617)
  • Loading branch information
HenningNormann authored Jan 28, 2025
1 parent 3486307 commit 3849fa1
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Storage/Controllers/InstancesController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,6 @@ public async Task<ActionResult<QueryResponse<Instance>>> GetInstances(InstanceQu
return Forbid();
}
}

// Default for service owners is to exclude migrated altinn 1 and 2 instances
if (queryParameters.MainVersionExclude == null && queryParameters.MainVersionInclude == null)
{
queryParameters.MainVersionInclude = 3;
}
}
else if (userId is not null || systemUser is not null)
{
Expand Down Expand Up @@ -229,6 +223,12 @@ public async Task<ActionResult<QueryResponse<Instance>>> GetInstances(InstanceQu
queryParameters.SortBy = "desc:lastChanged";
}

// Default is to exclude migrated altinn 1 and 2 instances
if (queryParameters.MainVersionExclude == null && queryParameters.MainVersionInclude == null)
{
queryParameters.MainVersionInclude = 3;
}

queryParameters.Size ??= 100;

try
Expand Down

0 comments on commit 3849fa1

Please sign in to comment.