mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-22 14:22:40 +01:00
Permissions: Remove deprecated custodian account policies (#6193)
Updates the store owner role and removes these three deprecated policies: - `btcpay.store.cantradecustodianaccount` - `btcpay.store.canwithdrawfromcustodianaccount` - `btcpay.store.candeposittocustodianaccount`
This commit is contained in:
parent
d4c30866b7
commit
3bad5883bb
1 changed files with 54 additions and 0 deletions
|
@ -0,0 +1,54 @@
|
|||
using BTCPayServer.Data;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace BTCPayServer.Migrations
|
||||
{
|
||||
[DbContext(typeof(ApplicationDbContext))]
|
||||
[Migration("20240904092905_UpdateStoreOwnerRole")]
|
||||
public partial class UpdateStoreOwnerRole : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.UpdateData(
|
||||
"StoreRoles",
|
||||
keyColumns: new[] { "Id" },
|
||||
keyColumnTypes: new[] { "TEXT" },
|
||||
keyValues: new[] { "Owner" },
|
||||
columns: new[] { "Permissions" },
|
||||
columnTypes: new[] { "TEXT[]" },
|
||||
values: new object[]
|
||||
{
|
||||
new[]
|
||||
{
|
||||
"btcpay.store.canmodifystoresettings"
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.UpdateData(
|
||||
"StoreRoles",
|
||||
keyColumns: new[] { "Id" },
|
||||
keyColumnTypes: new[] { "TEXT" },
|
||||
keyValues: new[] { "Owner" },
|
||||
columns: new[] { "Permissions" },
|
||||
columnTypes: new[] { "TEXT[]" },
|
||||
values: new object[]
|
||||
{
|
||||
new[]
|
||||
{
|
||||
"btcpay.store.canmodifystoresettings",
|
||||
"btcpay.store.cantradecustodianaccount",
|
||||
"btcpay.store.canwithdrawfromcustodianaccount",
|
||||
"btcpay.store.candeposittocustodianaccount"
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue