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.
34 lines
1.4 KiB
C#
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\"]");
|
|
}
|
|
}
|
|
}
|