Skip to content

Commit 58a2170

Browse files
fix(janitor): Update min auth level on janitor RR sync (#2003)
Co-authored-by: Ole Jørgen Skogstad <skogstad@softis.net>
1 parent f8d232b commit 58a2170

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Digdir.Domain.Dialogporten.Infrastructure/Persistence/Repositories/ResourcePolicyInformationRepository.cs

+4-1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ public async Task<DateTimeOffset> GetLastUpdatedAt(
3030

3131
public async Task<int> Merge(IReadOnlyCollection<ResourcePolicyInformation> resourceMetadata, CancellationToken cancellationToken)
3232
{
33+
// language=sql
3334
const string sql =
3435
$"""
3536
with source as (
@@ -41,7 +42,9 @@ as s(id, resource, minimumSecurityLevel, createdAt, updatedAt)
4142
using source s
4243
on t."{nameof(ResourcePolicyInformation.Resource)}" = s.resource
4344
when matched then
44-
update set "{nameof(ResourcePolicyInformation.UpdatedAt)}" = s.updatedAt
45+
update set
46+
"{nameof(ResourcePolicyInformation.UpdatedAt)}" = s.updatedAt,
47+
"{nameof(ResourcePolicyInformation.MinimumAuthenticationLevel)}" = s.minimumSecurityLevel
4548
when not matched then
4649
insert ("{nameof(ResourcePolicyInformation.Id)}", "{nameof(ResourcePolicyInformation.Resource)}", "{nameof(ResourcePolicyInformation.MinimumAuthenticationLevel)}", "{nameof(ResourcePolicyInformation.CreatedAt)}", "{nameof(ResourcePolicyInformation.UpdatedAt)}")
4750
values (s.id, s.resource, s.minimumSecurityLevel, s.createdAt, s.updatedAt);

0 commit comments

Comments
 (0)