Files
Microsoft.SelfService.Porta…/Migrations/20260709171904_AddCentralizedAuthorizationScopes.cs
Torsten Brendgen dfd9c16f61 Add migration to update ApiClients with centralized authorization scopes
This migration updates the ScopesJson for the ApiClient with Id 91000000-0000-0000-0000-000000000001 to include additional authorization scopes for improved API access control. The Down method reverts the changes if necessary.
2026-07-09 23:49:01 +02:00

34 lines
1.4 KiB
C#

using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Microsoft.SelfService.Portal.Core.API.Migrations
{
/// <inheritdoc />
public partial class AddCentralizedAuthorizationScopes : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.UpdateData(
table: "ApiClients",
keyColumn: "Id",
keyValue: new Guid("91000000-0000-0000-0000-000000000001"),
column: "ScopesJson",
value: "[\"configuration.read\",\"configuration.write\",\"credential.read\",\"credential.write\",\"credential.resolve\",\"deployment.read\",\"deployment.write\",\"queue.read\",\"queue.process\",\"template.read\",\"template.write\",\"token.manage\",\"token.admin\"]");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.UpdateData(
table: "ApiClients",
keyColumn: "Id",
keyValue: new Guid("91000000-0000-0000-0000-000000000001"),
column: "ScopesJson",
value: "[\"deployment.read\",\"deployment.write\",\"queue.process\",\"template.read\",\"credential.resolve\",\"token.manage\",\"token.admin\"]");
}
}
}