Compare commits
No commits in common. "main" and "1.0.8-rc14" have entirely different histories.
main
...
1.0.8-rc14
60 changed files with 21 additions and 10674 deletions
|
|
@ -48,4 +48,4 @@ jobs:
|
||||||
--verbosity normal \
|
--verbosity normal \
|
||||||
--filter="Category!=Platform-Android" \
|
--filter="Category!=Platform-Android" \
|
||||||
--logger "xunit;LogFileName=test-results.xml" \
|
--logger "xunit;LogFileName=test-results.xml" \
|
||||||
&& echo "✅ Success !" || { echo "❌ Fail ($?)!"; exit 1; }
|
&& echo "✅ Success !" || echo "❌ Fail ($?)!"
|
||||||
|
|
|
||||||
|
|
@ -175,12 +175,6 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
cd /src/_src
|
cd /src/_src
|
||||||
dotnet restore
|
dotnet restore
|
||||||
- name: Test
|
|
||||||
run: |
|
|
||||||
cd /src/_src && dotnet test \
|
|
||||||
--verbosity normal \
|
|
||||||
--filter="Category!=Platform-Android" \
|
|
||||||
--logger "xunit;LogFileName=test-results.xml"
|
|
||||||
|
|
||||||
- name: Build de PostIt.Android ARM64
|
- name: Build de PostIt.Android ARM64
|
||||||
run: |
|
run: |
|
||||||
|
|
@ -206,7 +200,6 @@ jobs:
|
||||||
RELEASE_BODY: ${{ env.RELEASE_BODY }}
|
RELEASE_BODY: ${{ env.RELEASE_BODY }}
|
||||||
IS_PRERELEASE: ${{ env.IS_PRERELEASE }}
|
IS_PRERELEASE: ${{ env.IS_PRERELEASE }}
|
||||||
run: |
|
run: |
|
||||||
set -e
|
|
||||||
if [[ -z "$TAG" ]]; then
|
if [[ -z "$TAG" ]]; then
|
||||||
echo "::error::No tag resolved for the API call."
|
echo "::error::No tag resolved for the API call."
|
||||||
exit 1
|
exit 1
|
||||||
|
|
|
||||||
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -35,7 +35,6 @@ appsettings-*.*.json
|
||||||
|
|
||||||
generated/
|
generated/
|
||||||
*.tmp
|
*.tmp
|
||||||
tmp/
|
|
||||||
DataDir/
|
DataDir/
|
||||||
|
|
||||||
*.tests.trx
|
*.tests.trx
|
||||||
|
|
|
||||||
|
|
@ -45,8 +45,10 @@ public class BillingQueriesPageViewModelTests
|
||||||
Assert.Equal(2, vm.Queries.Count);
|
Assert.Equal(2, vm.Queries.Count);
|
||||||
Assert.All(vm.Queries, q => Assert.DoesNotContain("Rejected", q.StatusLabel, StringComparison.OrdinalIgnoreCase));
|
Assert.All(vm.Queries, q => Assert.DoesNotContain("Rejected", q.StatusLabel, StringComparison.OrdinalIgnoreCase));
|
||||||
Assert.Contains("lecture seule", vm.StatusMessage, StringComparison.OrdinalIgnoreCase);
|
Assert.Contains("lecture seule", vm.StatusMessage, StringComparison.OrdinalIgnoreCase);
|
||||||
|
Assert.False(vm.CanOpenDetails);
|
||||||
|
|
||||||
Assert.True(vm.Queries.Count > 0);
|
vm.SelectedQuery = vm.Queries[0];
|
||||||
|
Assert.False(vm.OpenSelectedQueryCommand.CanExecute(null));
|
||||||
}
|
}
|
||||||
|
|
||||||
private sealed class StubBillingApi : IYavscApiClient
|
private sealed class StubBillingApi : IYavscApiClient
|
||||||
|
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
|
|
||||||
namespace Yavsc.Models.Access
|
|
||||||
{
|
|
||||||
using Yavsc.Abstract.Identity.Security;
|
|
||||||
|
|
||||||
public class FileAccessControlRulePayload : CircleAuthorization
|
|
||||||
{
|
|
||||||
public virtual string Path { get; set; }
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -370,6 +370,8 @@ public sealed class BlogsWebServerFixture : WebHostFixture
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>Create a circle owned by <paramref name="ownerId"/>
|
/// <summary>Create a circle owned by <paramref name="ownerId"/>
|
||||||
/// directly in the SQLite store and return its server-assigned
|
/// directly in the SQLite store and return its server-assigned
|
||||||
/// id.</summary>
|
/// id.</summary>
|
||||||
|
|
@ -413,4 +415,5 @@ public sealed class BlogsWebServerFixture : WebHostFixture
|
||||||
db.SaveChanges();
|
db.SaveChanges();
|
||||||
return post.Id;
|
return post.Id;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,6 @@ using IdentityModel;
|
||||||
using Yavsc.Server.Helpers;
|
using Yavsc.Server.Helpers;
|
||||||
using Microsoft.AspNetCore.Mvc.Localization;
|
using Microsoft.AspNetCore.Mvc.Localization;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Data.Common;
|
|
||||||
|
|
||||||
namespace Yavsc.Controllers
|
namespace Yavsc.Controllers
|
||||||
{
|
{
|
||||||
|
|
@ -539,9 +538,9 @@ IHtmlLocalizerFactory htmlLocalizerFactory,
|
||||||
{
|
{
|
||||||
for (var current = exception; current is not null; current = current.InnerException)
|
for (var current = exception; current is not null; current = current.InnerException)
|
||||||
{
|
{
|
||||||
if (current is DbException pg
|
if (current is PostgresException pg
|
||||||
&& pg.ErrorCode == 23505)
|
&& pg.SqlState == PostgresErrorCodes.UniqueViolation
|
||||||
// UNIQUE VIOLATION https://www.postgresql.org/docs/8.4/errcodes-appendix.html
|
&& string.Equals(pg.ConstraintName, "AK_AspNetUsers_Email", StringComparison.Ordinal))
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,825 +0,0 @@
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace Yavsc.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class AddCircleAuthorizationToFileAcl : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_BankIdentity_AspNetUsers_UserId",
|
|
||||||
table: "BankIdentity");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_DeviceDeclaration_AspNetUsers_DeviceOwnerId",
|
|
||||||
table: "DeviceDeclaration");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_Estimates_Performers_OwnerId",
|
|
||||||
table: "Estimates");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_HairMultiCutQueries_Locations_LocationId",
|
|
||||||
table: "HairMultiCutQueries");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_RdvQueries_Locations_LocationId",
|
|
||||||
table: "RdvQueries");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "Content",
|
|
||||||
table: "TrustDeclarations",
|
|
||||||
type: "character varying(2000)",
|
|
||||||
maxLength: 2000,
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: "",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "character varying(2000)",
|
|
||||||
oldMaxLength: 2000,
|
|
||||||
oldNullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "UserModified",
|
|
||||||
table: "RdvQueries",
|
|
||||||
type: "text",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: "",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text",
|
|
||||||
oldNullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "UserCreated",
|
|
||||||
table: "RdvQueries",
|
|
||||||
type: "text",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: "",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text",
|
|
||||||
oldNullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "Reason",
|
|
||||||
table: "RdvQueries",
|
|
||||||
type: "text",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: "",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text",
|
|
||||||
oldNullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<long>(
|
|
||||||
name: "LocationId",
|
|
||||||
table: "RdvQueries",
|
|
||||||
type: "bigint",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: 0L,
|
|
||||||
oldClrType: typeof(long),
|
|
||||||
oldType: "bigint",
|
|
||||||
oldNullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "Description",
|
|
||||||
table: "RdvQueries",
|
|
||||||
type: "text",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: "",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text",
|
|
||||||
oldNullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "UserModified",
|
|
||||||
table: "Project",
|
|
||||||
type: "text",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: "",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text",
|
|
||||||
oldNullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "UserCreated",
|
|
||||||
table: "Project",
|
|
||||||
type: "text",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: "",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text",
|
|
||||||
oldNullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "WebSite",
|
|
||||||
table: "Performers",
|
|
||||||
type: "text",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: "",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text",
|
|
||||||
oldNullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "ExerciseCountryCode",
|
|
||||||
table: "Performers",
|
|
||||||
type: "text",
|
|
||||||
nullable: false,
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "character varying(2)",
|
|
||||||
oldMaxLength: 2);
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "UserModified",
|
|
||||||
table: "HairMultiCutQueries",
|
|
||||||
type: "text",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: "",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text",
|
|
||||||
oldNullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "UserCreated",
|
|
||||||
table: "HairMultiCutQueries",
|
|
||||||
type: "text",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: "",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text",
|
|
||||||
oldNullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<long>(
|
|
||||||
name: "LocationId",
|
|
||||||
table: "HairMultiCutQueries",
|
|
||||||
type: "bigint",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: 0L,
|
|
||||||
oldClrType: typeof(long),
|
|
||||||
oldType: "bigint",
|
|
||||||
oldNullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "Description",
|
|
||||||
table: "HairMultiCutQueries",
|
|
||||||
type: "text",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: "",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text",
|
|
||||||
oldNullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "UserModified",
|
|
||||||
table: "HairCutQueries",
|
|
||||||
type: "text",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: "",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text",
|
|
||||||
oldNullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "UserCreated",
|
|
||||||
table: "HairCutQueries",
|
|
||||||
type: "text",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: "",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text",
|
|
||||||
oldNullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "Description",
|
|
||||||
table: "HairCutQueries",
|
|
||||||
type: "text",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: "",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text",
|
|
||||||
oldNullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "AdditionalInfo",
|
|
||||||
table: "HairCutQueries",
|
|
||||||
type: "text",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: "",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text",
|
|
||||||
oldNullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "Title",
|
|
||||||
table: "Estimates",
|
|
||||||
type: "text",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: "",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text",
|
|
||||||
oldNullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "OwnerId",
|
|
||||||
table: "Estimates",
|
|
||||||
type: "text",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: "",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text",
|
|
||||||
oldNullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "Description",
|
|
||||||
table: "Estimates",
|
|
||||||
type: "text",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: "",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text",
|
|
||||||
oldNullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "AttachedGraphicsString",
|
|
||||||
table: "Estimates",
|
|
||||||
type: "text",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: "",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text",
|
|
||||||
oldNullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "AttachedFilesString",
|
|
||||||
table: "Estimates",
|
|
||||||
type: "text",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: "",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text",
|
|
||||||
oldNullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "Version",
|
|
||||||
table: "DeviceDeclaration",
|
|
||||||
type: "text",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: "",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text",
|
|
||||||
oldNullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "Platform",
|
|
||||||
table: "DeviceDeclaration",
|
|
||||||
type: "text",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: "",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text",
|
|
||||||
oldNullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "Model",
|
|
||||||
table: "DeviceDeclaration",
|
|
||||||
type: "text",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: "",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text",
|
|
||||||
oldNullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "DeviceOwnerId",
|
|
||||||
table: "DeviceDeclaration",
|
|
||||||
type: "text",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: "",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text",
|
|
||||||
oldNullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "UserModified",
|
|
||||||
table: "Comment",
|
|
||||||
type: "text",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: "",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text",
|
|
||||||
oldNullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "UserCreated",
|
|
||||||
table: "Comment",
|
|
||||||
type: "text",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: "",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text",
|
|
||||||
oldNullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "Article",
|
|
||||||
table: "Comment",
|
|
||||||
type: "text",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: "",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text",
|
|
||||||
oldNullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "Title",
|
|
||||||
table: "Bug",
|
|
||||||
type: "text",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: "",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text",
|
|
||||||
oldNullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "Description",
|
|
||||||
table: "Bug",
|
|
||||||
type: "character varying(10240)",
|
|
||||||
maxLength: 10240,
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: "",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "character varying(10240)",
|
|
||||||
oldMaxLength: 10240,
|
|
||||||
oldNullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "WicketCode",
|
|
||||||
table: "BankIdentity",
|
|
||||||
type: "text",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: "",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text",
|
|
||||||
oldNullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "UserId",
|
|
||||||
table: "BankIdentity",
|
|
||||||
type: "text",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: "",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text",
|
|
||||||
oldNullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "IBAN",
|
|
||||||
table: "BankIdentity",
|
|
||||||
type: "text",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: "",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text",
|
|
||||||
oldNullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "BankCode",
|
|
||||||
table: "BankIdentity",
|
|
||||||
type: "text",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: "",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text",
|
|
||||||
oldNullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "BIC",
|
|
||||||
table: "BankIdentity",
|
|
||||||
type: "text",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: "",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text",
|
|
||||||
oldNullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "AccountNumber",
|
|
||||||
table: "BankIdentity",
|
|
||||||
type: "text",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: "",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text",
|
|
||||||
oldNullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_BankIdentity_AspNetUsers_UserId",
|
|
||||||
table: "BankIdentity",
|
|
||||||
column: "UserId",
|
|
||||||
principalTable: "AspNetUsers",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_DeviceDeclaration_AspNetUsers_DeviceOwnerId",
|
|
||||||
table: "DeviceDeclaration",
|
|
||||||
column: "DeviceOwnerId",
|
|
||||||
principalTable: "AspNetUsers",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_Estimates_Performers_OwnerId",
|
|
||||||
table: "Estimates",
|
|
||||||
column: "OwnerId",
|
|
||||||
principalTable: "Performers",
|
|
||||||
principalColumn: "PerformerId",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_HairMultiCutQueries_Locations_LocationId",
|
|
||||||
table: "HairMultiCutQueries",
|
|
||||||
column: "LocationId",
|
|
||||||
principalTable: "Locations",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_RdvQueries_Locations_LocationId",
|
|
||||||
table: "RdvQueries",
|
|
||||||
column: "LocationId",
|
|
||||||
principalTable: "Locations",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_BankIdentity_AspNetUsers_UserId",
|
|
||||||
table: "BankIdentity");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_DeviceDeclaration_AspNetUsers_DeviceOwnerId",
|
|
||||||
table: "DeviceDeclaration");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_Estimates_Performers_OwnerId",
|
|
||||||
table: "Estimates");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_HairMultiCutQueries_Locations_LocationId",
|
|
||||||
table: "HairMultiCutQueries");
|
|
||||||
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_RdvQueries_Locations_LocationId",
|
|
||||||
table: "RdvQueries");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "Content",
|
|
||||||
table: "TrustDeclarations",
|
|
||||||
type: "character varying(2000)",
|
|
||||||
maxLength: 2000,
|
|
||||||
nullable: true,
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "character varying(2000)",
|
|
||||||
oldMaxLength: 2000);
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "UserModified",
|
|
||||||
table: "RdvQueries",
|
|
||||||
type: "text",
|
|
||||||
nullable: true,
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "UserCreated",
|
|
||||||
table: "RdvQueries",
|
|
||||||
type: "text",
|
|
||||||
nullable: true,
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "Reason",
|
|
||||||
table: "RdvQueries",
|
|
||||||
type: "text",
|
|
||||||
nullable: true,
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<long>(
|
|
||||||
name: "LocationId",
|
|
||||||
table: "RdvQueries",
|
|
||||||
type: "bigint",
|
|
||||||
nullable: true,
|
|
||||||
oldClrType: typeof(long),
|
|
||||||
oldType: "bigint");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "Description",
|
|
||||||
table: "RdvQueries",
|
|
||||||
type: "text",
|
|
||||||
nullable: true,
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "UserModified",
|
|
||||||
table: "Project",
|
|
||||||
type: "text",
|
|
||||||
nullable: true,
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "UserCreated",
|
|
||||||
table: "Project",
|
|
||||||
type: "text",
|
|
||||||
nullable: true,
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "WebSite",
|
|
||||||
table: "Performers",
|
|
||||||
type: "text",
|
|
||||||
nullable: true,
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "ExerciseCountryCode",
|
|
||||||
table: "Performers",
|
|
||||||
type: "character varying(2)",
|
|
||||||
maxLength: 2,
|
|
||||||
nullable: false,
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "UserModified",
|
|
||||||
table: "HairMultiCutQueries",
|
|
||||||
type: "text",
|
|
||||||
nullable: true,
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "UserCreated",
|
|
||||||
table: "HairMultiCutQueries",
|
|
||||||
type: "text",
|
|
||||||
nullable: true,
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<long>(
|
|
||||||
name: "LocationId",
|
|
||||||
table: "HairMultiCutQueries",
|
|
||||||
type: "bigint",
|
|
||||||
nullable: true,
|
|
||||||
oldClrType: typeof(long),
|
|
||||||
oldType: "bigint");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "Description",
|
|
||||||
table: "HairMultiCutQueries",
|
|
||||||
type: "text",
|
|
||||||
nullable: true,
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "UserModified",
|
|
||||||
table: "HairCutQueries",
|
|
||||||
type: "text",
|
|
||||||
nullable: true,
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "UserCreated",
|
|
||||||
table: "HairCutQueries",
|
|
||||||
type: "text",
|
|
||||||
nullable: true,
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "Description",
|
|
||||||
table: "HairCutQueries",
|
|
||||||
type: "text",
|
|
||||||
nullable: true,
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "AdditionalInfo",
|
|
||||||
table: "HairCutQueries",
|
|
||||||
type: "text",
|
|
||||||
nullable: true,
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "Title",
|
|
||||||
table: "Estimates",
|
|
||||||
type: "text",
|
|
||||||
nullable: true,
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "OwnerId",
|
|
||||||
table: "Estimates",
|
|
||||||
type: "text",
|
|
||||||
nullable: true,
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "Description",
|
|
||||||
table: "Estimates",
|
|
||||||
type: "text",
|
|
||||||
nullable: true,
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "AttachedGraphicsString",
|
|
||||||
table: "Estimates",
|
|
||||||
type: "text",
|
|
||||||
nullable: true,
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "AttachedFilesString",
|
|
||||||
table: "Estimates",
|
|
||||||
type: "text",
|
|
||||||
nullable: true,
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "Version",
|
|
||||||
table: "DeviceDeclaration",
|
|
||||||
type: "text",
|
|
||||||
nullable: true,
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "Platform",
|
|
||||||
table: "DeviceDeclaration",
|
|
||||||
type: "text",
|
|
||||||
nullable: true,
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "Model",
|
|
||||||
table: "DeviceDeclaration",
|
|
||||||
type: "text",
|
|
||||||
nullable: true,
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "DeviceOwnerId",
|
|
||||||
table: "DeviceDeclaration",
|
|
||||||
type: "text",
|
|
||||||
nullable: true,
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "UserModified",
|
|
||||||
table: "Comment",
|
|
||||||
type: "text",
|
|
||||||
nullable: true,
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "UserCreated",
|
|
||||||
table: "Comment",
|
|
||||||
type: "text",
|
|
||||||
nullable: true,
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "Article",
|
|
||||||
table: "Comment",
|
|
||||||
type: "text",
|
|
||||||
nullable: true,
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "Title",
|
|
||||||
table: "Bug",
|
|
||||||
type: "text",
|
|
||||||
nullable: true,
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "Description",
|
|
||||||
table: "Bug",
|
|
||||||
type: "character varying(10240)",
|
|
||||||
maxLength: 10240,
|
|
||||||
nullable: true,
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "character varying(10240)",
|
|
||||||
oldMaxLength: 10240);
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "WicketCode",
|
|
||||||
table: "BankIdentity",
|
|
||||||
type: "text",
|
|
||||||
nullable: true,
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "UserId",
|
|
||||||
table: "BankIdentity",
|
|
||||||
type: "text",
|
|
||||||
nullable: true,
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "IBAN",
|
|
||||||
table: "BankIdentity",
|
|
||||||
type: "text",
|
|
||||||
nullable: true,
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "BankCode",
|
|
||||||
table: "BankIdentity",
|
|
||||||
type: "text",
|
|
||||||
nullable: true,
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "BIC",
|
|
||||||
table: "BankIdentity",
|
|
||||||
type: "text",
|
|
||||||
nullable: true,
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "AccountNumber",
|
|
||||||
table: "BankIdentity",
|
|
||||||
type: "text",
|
|
||||||
nullable: true,
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_BankIdentity_AspNetUsers_UserId",
|
|
||||||
table: "BankIdentity",
|
|
||||||
column: "UserId",
|
|
||||||
principalTable: "AspNetUsers",
|
|
||||||
principalColumn: "Id");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_DeviceDeclaration_AspNetUsers_DeviceOwnerId",
|
|
||||||
table: "DeviceDeclaration",
|
|
||||||
column: "DeviceOwnerId",
|
|
||||||
principalTable: "AspNetUsers",
|
|
||||||
principalColumn: "Id");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_Estimates_Performers_OwnerId",
|
|
||||||
table: "Estimates",
|
|
||||||
column: "OwnerId",
|
|
||||||
principalTable: "Performers",
|
|
||||||
principalColumn: "PerformerId");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_HairMultiCutQueries_Locations_LocationId",
|
|
||||||
table: "HairMultiCutQueries",
|
|
||||||
column: "LocationId",
|
|
||||||
principalTable: "Locations",
|
|
||||||
principalColumn: "Id");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_RdvQueries_Locations_LocationId",
|
|
||||||
table: "RdvQueries",
|
|
||||||
column: "LocationId",
|
|
||||||
principalTable: "Locations",
|
|
||||||
principalColumn: "Id");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
4818
src/Yavsc.Org/Migrations/20260907100133_fileACL.Designer.cs
generated
4818
src/Yavsc.Org/Migrations/20260907100133_fileACL.Designer.cs
generated
File diff suppressed because it is too large
Load diff
|
|
@ -1,52 +0,0 @@
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace Yavsc.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class fileACL : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "CircleAuthorizationToFile",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
CircleId = table.Column<long>(type: "bigint", nullable: false),
|
|
||||||
Path = table.Column<string>(type: "text", nullable: false),
|
|
||||||
OwnerId = table.Column<string>(type: "text", nullable: false),
|
|
||||||
Access = table.Column<byte>(type: "smallint", nullable: false)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_CircleAuthorizationToFile", x => new { x.CircleId, x.Path, x.OwnerId });
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_CircleAuthorizationToFile_AspNetUsers_OwnerId",
|
|
||||||
column: x => x.OwnerId,
|
|
||||||
principalTable: "AspNetUsers",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_CircleAuthorizationToFile_Circle_CircleId",
|
|
||||||
column: x => x.CircleId,
|
|
||||||
principalTable: "Circle",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_CircleAuthorizationToFile_OwnerId",
|
|
||||||
table: "CircleAuthorizationToFile",
|
|
||||||
column: "OwnerId");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "CircleAuthorizationToFile");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1088,27 +1088,6 @@ namespace Yavsc.Migrations
|
||||||
b.ToTable("CircleAuthorizationToBlogPost");
|
b.ToTable("CircleAuthorizationToBlogPost");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Yavsc.Models.Access.CircleAuthorizationToFile", b =>
|
|
||||||
{
|
|
||||||
b.Property<long>("CircleId")
|
|
||||||
.HasColumnType("bigint");
|
|
||||||
|
|
||||||
b.Property<string>("Path")
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.Property<string>("OwnerId")
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.Property<byte>("Access")
|
|
||||||
.HasColumnType("smallint");
|
|
||||||
|
|
||||||
b.HasKey("CircleId", "Path", "OwnerId");
|
|
||||||
|
|
||||||
b.HasIndex("OwnerId");
|
|
||||||
|
|
||||||
b.ToTable("CircleAuthorizationToFile");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Yavsc.Models.AccountBalance", b =>
|
modelBuilder.Entity("Yavsc.Models.AccountBalance", b =>
|
||||||
{
|
{
|
||||||
b.Property<string>("UserId")
|
b.Property<string>("UserId")
|
||||||
|
|
@ -1263,30 +1242,24 @@ namespace Yavsc.Migrations
|
||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||||||
|
|
||||||
b.Property<string>("AccountNumber")
|
b.Property<string>("AccountNumber")
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("text");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("BIC")
|
b.Property<string>("BIC")
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("text");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("BankCode")
|
b.Property<string>("BankCode")
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("text");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<int>("BankedKey")
|
b.Property<int>("BankedKey")
|
||||||
.HasColumnType("integer");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
b.Property<string>("IBAN")
|
b.Property<string>("IBAN")
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("text");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("UserId")
|
b.Property<string>("UserId")
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("text");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("WicketCode")
|
b.Property<string>("WicketCode")
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("text");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
@ -1347,11 +1320,9 @@ namespace Yavsc.Migrations
|
||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||||||
|
|
||||||
b.Property<string>("AttachedFilesString")
|
b.Property<string>("AttachedFilesString")
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("text");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("AttachedGraphicsString")
|
b.Property<string>("AttachedGraphicsString")
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("text");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("ClientId")
|
b.Property<string>("ClientId")
|
||||||
|
|
@ -1369,18 +1340,15 @@ namespace Yavsc.Migrations
|
||||||
.HasColumnType("text");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("Description")
|
b.Property<string>("Description")
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("text");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("OwnerId")
|
b.Property<string>("OwnerId")
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("text");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<DateTime>("ProviderValidationDate")
|
b.Property<DateTime>("ProviderValidationDate")
|
||||||
.HasColumnType("timestamp with time zone");
|
.HasColumnType("timestamp with time zone");
|
||||||
|
|
||||||
b.Property<string>("Title")
|
b.Property<string>("Title")
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("text");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
@ -1553,7 +1521,6 @@ namespace Yavsc.Migrations
|
||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||||||
|
|
||||||
b.Property<string>("Article")
|
b.Property<string>("Article")
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("text");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("AuthorId")
|
b.Property<string>("AuthorId")
|
||||||
|
|
@ -1573,11 +1540,9 @@ namespace Yavsc.Migrations
|
||||||
.HasColumnType("bigint");
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
b.Property<string>("UserCreated")
|
b.Property<string>("UserCreated")
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("text");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("UserModified")
|
b.Property<string>("UserModified")
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("text");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<bool>("Visible")
|
b.Property<bool>("Visible")
|
||||||
|
|
@ -1927,7 +1892,6 @@ namespace Yavsc.Migrations
|
||||||
.HasColumnType("text");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("AdditionalInfo")
|
b.Property<string>("AdditionalInfo")
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("text");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("ClientId")
|
b.Property<string>("ClientId")
|
||||||
|
|
@ -1944,7 +1908,6 @@ namespace Yavsc.Migrations
|
||||||
.HasColumnType("timestamp with time zone");
|
.HasColumnType("timestamp with time zone");
|
||||||
|
|
||||||
b.Property<string>("Description")
|
b.Property<string>("Description")
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("text");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<DateTime?>("EventDate")
|
b.Property<DateTime?>("EventDate")
|
||||||
|
|
@ -1973,11 +1936,9 @@ namespace Yavsc.Migrations
|
||||||
.HasColumnType("integer");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
b.Property<string>("UserCreated")
|
b.Property<string>("UserCreated")
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("text");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("UserModified")
|
b.Property<string>("UserModified")
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("text");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<DateTime?>("ValidationDate")
|
b.Property<DateTime?>("ValidationDate")
|
||||||
|
|
@ -2028,13 +1989,12 @@ namespace Yavsc.Migrations
|
||||||
.HasColumnType("timestamp with time zone");
|
.HasColumnType("timestamp with time zone");
|
||||||
|
|
||||||
b.Property<string>("Description")
|
b.Property<string>("Description")
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("text");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<DateTime>("EventDate")
|
b.Property<DateTime>("EventDate")
|
||||||
.HasColumnType("timestamp with time zone");
|
.HasColumnType("timestamp with time zone");
|
||||||
|
|
||||||
b.Property<long>("LocationId")
|
b.Property<long?>("LocationId")
|
||||||
.HasColumnType("bigint");
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
b.Property<string>("PaymentId")
|
b.Property<string>("PaymentId")
|
||||||
|
|
@ -2051,11 +2011,9 @@ namespace Yavsc.Migrations
|
||||||
.HasColumnType("integer");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
b.Property<string>("UserCreated")
|
b.Property<string>("UserCreated")
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("text");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("UserModified")
|
b.Property<string>("UserModified")
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("text");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<DateTime?>("ValidationDate")
|
b.Property<DateTime?>("ValidationDate")
|
||||||
|
|
@ -2200,7 +2158,6 @@ namespace Yavsc.Migrations
|
||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||||||
|
|
||||||
b.Property<string>("Description")
|
b.Property<string>("Description")
|
||||||
.IsRequired()
|
|
||||||
.HasMaxLength(10240)
|
.HasMaxLength(10240)
|
||||||
.HasColumnType("character varying(10240)");
|
.HasColumnType("character varying(10240)");
|
||||||
|
|
||||||
|
|
@ -2211,7 +2168,6 @@ namespace Yavsc.Migrations
|
||||||
.HasColumnType("integer");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
b.Property<string>("Title")
|
b.Property<string>("Title")
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("text");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
@ -2232,22 +2188,18 @@ namespace Yavsc.Migrations
|
||||||
.HasDefaultValueSql("LOCALTIMESTAMP");
|
.HasDefaultValueSql("LOCALTIMESTAMP");
|
||||||
|
|
||||||
b.Property<string>("DeviceOwnerId")
|
b.Property<string>("DeviceOwnerId")
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("text");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<DateTime?>("LatestActivityUpdate")
|
b.Property<DateTime?>("LatestActivityUpdate")
|
||||||
.HasColumnType("timestamp with time zone");
|
.HasColumnType("timestamp with time zone");
|
||||||
|
|
||||||
b.Property<string>("Model")
|
b.Property<string>("Model")
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("text");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("Platform")
|
b.Property<string>("Platform")
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("text");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("Version")
|
b.Property<string>("Version")
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("text");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.HasKey("DeviceId");
|
b.HasKey("DeviceId");
|
||||||
|
|
@ -2360,7 +2312,6 @@ namespace Yavsc.Migrations
|
||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||||||
|
|
||||||
b.Property<string>("Content")
|
b.Property<string>("Content")
|
||||||
.IsRequired()
|
|
||||||
.HasMaxLength(2000)
|
.HasMaxLength(2000)
|
||||||
.HasColumnType("character varying(2000)");
|
.HasColumnType("character varying(2000)");
|
||||||
|
|
||||||
|
|
@ -3135,7 +3086,8 @@ namespace Yavsc.Migrations
|
||||||
|
|
||||||
b.Property<string>("ExerciseCountryCode")
|
b.Property<string>("ExerciseCountryCode")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("text");
|
.HasMaxLength(2)
|
||||||
|
.HasColumnType("character varying(2)");
|
||||||
|
|
||||||
b.Property<int?>("MaxDailyCost")
|
b.Property<int?>("MaxDailyCost")
|
||||||
.HasColumnType("integer");
|
.HasColumnType("integer");
|
||||||
|
|
@ -3157,7 +3109,6 @@ namespace Yavsc.Migrations
|
||||||
.HasColumnType("boolean");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
b.Property<string>("WebSite")
|
b.Property<string>("WebSite")
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("text");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.HasKey("PerformerId");
|
b.HasKey("PerformerId");
|
||||||
|
|
@ -3206,13 +3157,12 @@ namespace Yavsc.Migrations
|
||||||
.HasColumnType("timestamp with time zone");
|
.HasColumnType("timestamp with time zone");
|
||||||
|
|
||||||
b.Property<string>("Description")
|
b.Property<string>("Description")
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("text");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<DateTime>("EventDate")
|
b.Property<DateTime>("EventDate")
|
||||||
.HasColumnType("timestamp with time zone");
|
.HasColumnType("timestamp with time zone");
|
||||||
|
|
||||||
b.Property<long>("LocationId")
|
b.Property<long?>("LocationId")
|
||||||
.HasColumnType("bigint");
|
.HasColumnType("bigint");
|
||||||
|
|
||||||
b.Property<int>("LocationType")
|
b.Property<int>("LocationType")
|
||||||
|
|
@ -3229,18 +3179,15 @@ namespace Yavsc.Migrations
|
||||||
.HasColumnType("numeric");
|
.HasColumnType("numeric");
|
||||||
|
|
||||||
b.Property<string>("Reason")
|
b.Property<string>("Reason")
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("text");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<int>("Status")
|
b.Property<int>("Status")
|
||||||
.HasColumnType("integer");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
b.Property<string>("UserCreated")
|
b.Property<string>("UserCreated")
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("text");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("UserModified")
|
b.Property<string>("UserModified")
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("text");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<DateTime?>("ValidationDate")
|
b.Property<DateTime?>("ValidationDate")
|
||||||
|
|
@ -3379,11 +3326,9 @@ namespace Yavsc.Migrations
|
||||||
.HasColumnType("integer");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
b.Property<string>("UserCreated")
|
b.Property<string>("UserCreated")
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("text");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("UserModified")
|
b.Property<string>("UserModified")
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("text");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<DateTime?>("ValidationDate")
|
b.Property<DateTime?>("ValidationDate")
|
||||||
|
|
@ -3788,25 +3733,6 @@ namespace Yavsc.Migrations
|
||||||
b.Navigation("Target");
|
b.Navigation("Target");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Yavsc.Models.Access.CircleAuthorizationToFile", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("Yavsc.Models.Relationship.Circle", "Allowed")
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("CircleId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.HasOne("Yavsc.Models.ApplicationUser", "Owner")
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("OwnerId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Allowed");
|
|
||||||
|
|
||||||
b.Navigation("Owner");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Yavsc.Models.AccountBalance", b =>
|
modelBuilder.Entity("Yavsc.Models.AccountBalance", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("Yavsc.Models.ApplicationUser", "Owner")
|
b.HasOne("Yavsc.Models.ApplicationUser", "Owner")
|
||||||
|
|
@ -3842,9 +3768,7 @@ namespace Yavsc.Migrations
|
||||||
{
|
{
|
||||||
b.HasOne("Yavsc.Models.ApplicationUser", "User")
|
b.HasOne("Yavsc.Models.ApplicationUser", "User")
|
||||||
.WithMany("BankInfo")
|
.WithMany("BankInfo")
|
||||||
.HasForeignKey("UserId")
|
.HasForeignKey("UserId");
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("User");
|
b.Navigation("User");
|
||||||
});
|
});
|
||||||
|
|
@ -3876,9 +3800,7 @@ namespace Yavsc.Migrations
|
||||||
|
|
||||||
b.HasOne("Yavsc.Models.Workflow.PerformerProfile", "Owner")
|
b.HasOne("Yavsc.Models.Workflow.PerformerProfile", "Owner")
|
||||||
.WithMany()
|
.WithMany()
|
||||||
.HasForeignKey("OwnerId")
|
.HasForeignKey("OwnerId");
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Client");
|
b.Navigation("Client");
|
||||||
|
|
||||||
|
|
@ -4139,9 +4061,7 @@ namespace Yavsc.Migrations
|
||||||
|
|
||||||
b.HasOne("Yavsc.Models.Relationship.Location", "Location")
|
b.HasOne("Yavsc.Models.Relationship.Location", "Location")
|
||||||
.WithMany()
|
.WithMany()
|
||||||
.HasForeignKey("LocationId")
|
.HasForeignKey("LocationId");
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.HasOne("Yavsc.Models.Payment.PayPalPayment", "Regularization")
|
b.HasOne("Yavsc.Models.Payment.PayPalPayment", "Regularization")
|
||||||
.WithMany()
|
.WithMany()
|
||||||
|
|
@ -4226,9 +4146,7 @@ namespace Yavsc.Migrations
|
||||||
{
|
{
|
||||||
b.HasOne("Yavsc.Models.ApplicationUser", "DeviceOwner")
|
b.HasOne("Yavsc.Models.ApplicationUser", "DeviceOwner")
|
||||||
.WithMany("DeviceDeclaration")
|
.WithMany("DeviceDeclaration")
|
||||||
.HasForeignKey("DeviceOwnerId")
|
.HasForeignKey("DeviceOwnerId");
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("DeviceOwner");
|
b.Navigation("DeviceOwner");
|
||||||
});
|
});
|
||||||
|
|
@ -4527,9 +4445,7 @@ namespace Yavsc.Migrations
|
||||||
|
|
||||||
b.HasOne("Yavsc.Models.Relationship.Location", "Location")
|
b.HasOne("Yavsc.Models.Relationship.Location", "Location")
|
||||||
.WithMany()
|
.WithMany()
|
||||||
.HasForeignKey("LocationId")
|
.HasForeignKey("LocationId");
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.HasOne("Yavsc.Models.Payment.PayPalPayment", "Regularization")
|
b.HasOne("Yavsc.Models.Payment.PayPalPayment", "Regularization")
|
||||||
.WithMany()
|
.WithMany()
|
||||||
|
|
|
||||||
|
|
@ -1,24 +0,0 @@
|
||||||
|
|
||||||
namespace Yavsc.Models.Access
|
|
||||||
{
|
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
|
||||||
using System.Text.Json.Serialization;
|
|
||||||
using Models.Relationship;
|
|
||||||
using Yavsc.Services;
|
|
||||||
|
|
||||||
public class CircleAuthorizationToFile : FileAccessControlRulePayload
|
|
||||||
{
|
|
||||||
public FileAccessRight Access { get; set; }
|
|
||||||
|
|
||||||
[JsonIgnore]
|
|
||||||
[ForeignKey("CircleId")]
|
|
||||||
public virtual Circle Allowed { get; set; }
|
|
||||||
|
|
||||||
public string OwnerId { get; set; }
|
|
||||||
|
|
||||||
[JsonIgnore]
|
|
||||||
[ForeignKey("OwnerId")]
|
|
||||||
public virtual ApplicationUser Owner { get; set; }
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
using IdentityServer8.EntityFramework.Entities;
|
using IdentityServer8.EntityFramework.Entities;
|
||||||
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
|
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Microsoft.EntityFrameworkCore.ChangeTracking;
|
using Microsoft.EntityFrameworkCore.ChangeTracking;
|
||||||
|
|
@ -96,22 +96,6 @@ namespace Yavsc.Models
|
||||||
builder.Entity<UserActivity>().HasKey(u => new { u.DoesCode, u.UserId });
|
builder.Entity<UserActivity>().HasKey(u => new { u.DoesCode, u.UserId });
|
||||||
builder.Entity<Instrumentation>().HasKey(u => new { u.InstrumentId, u.UserId });
|
builder.Entity<Instrumentation>().HasKey(u => new { u.InstrumentId, u.UserId });
|
||||||
builder.Entity<CircleAuthorizationToBlogPost>().HasKey(a => new { a.CircleId, a.BlogPostId });
|
builder.Entity<CircleAuthorizationToBlogPost>().HasKey(a => new { a.CircleId, a.BlogPostId });
|
||||||
builder.Entity<CircleAuthorizationToFile>().HasKey(a => new { a.CircleId, a.Path, a.OwnerId });
|
|
||||||
builder.Entity<CircleAuthorizationToFile>()
|
|
||||||
.HasOne(a => a.Allowed)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey(a => a.CircleId)
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
;
|
|
||||||
builder.Entity<CircleAuthorizationToFile>()
|
|
||||||
.HasOne(a => a.Owner)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey(a => a.OwnerId)
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
;
|
|
||||||
builder.Entity<CircleAuthorizationToFile>()
|
|
||||||
.Property(a => a.Access)
|
|
||||||
.HasConversion<byte>();
|
|
||||||
builder.Entity<CircleMember>().HasKey(c => new { c.MemberId, c.CircleId });
|
builder.Entity<CircleMember>().HasKey(c => new { c.MemberId, c.CircleId });
|
||||||
builder.Entity<DismissClicked>().HasKey(c => new { uid = c.UserId, notid = c.NotificationId });
|
builder.Entity<DismissClicked>().HasKey(c => new { uid = c.UserId, notid = c.NotificationId });
|
||||||
builder.Entity<HairTaintInstance>().HasKey(ti => new { ti.TaintId, ti.PrestationId });
|
builder.Entity<HairTaintInstance>().HasKey(ti => new { ti.TaintId, ti.PrestationId });
|
||||||
|
|
@ -383,8 +367,6 @@ namespace Yavsc.Models
|
||||||
|
|
||||||
public DbSet<CircleAuthorizationToBlogPost> CircleAuthorizationToBlogPost { get; set; }
|
public DbSet<CircleAuthorizationToBlogPost> CircleAuthorizationToBlogPost { get; set; }
|
||||||
|
|
||||||
public DbSet<CircleAuthorizationToFile> CircleAuthorizationToFile { get; set; }
|
|
||||||
|
|
||||||
public DbSet<CommandForm> CommandForm { get; set; }
|
public DbSet<CommandForm> CommandForm { get; set; }
|
||||||
|
|
||||||
public DbSet<Ban> Ban { get; set; }
|
public DbSet<Ban> Ban { get; set; }
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@ using Microsoft.EntityFrameworkCore;
|
||||||
using Microsoft.Extensions.Options;
|
using Microsoft.Extensions.Options;
|
||||||
using rules;
|
using rules;
|
||||||
using Yavsc.Models;
|
using Yavsc.Models;
|
||||||
using Yavsc.Models.Access;
|
|
||||||
using Yavsc.Server.Helpers;
|
using Yavsc.Server.Helpers;
|
||||||
|
|
||||||
namespace Yavsc.Services
|
namespace Yavsc.Services
|
||||||
|
|
@ -99,44 +98,7 @@ namespace Yavsc.Services
|
||||||
|
|
||||||
public void SetAccess(long circleId, string normalizedFullPath, FileAccessRight access)
|
public void SetAccess(long circleId, string normalizedFullPath, FileAccessRight access)
|
||||||
{
|
{
|
||||||
var providerUserName = normalizedFullPath.Split('/')[0];
|
throw new NotImplementedException();
|
||||||
var providerUserId = _dbContext.Users.SingleOrDefault(u => u.UserName == providerUserName)?.Id;
|
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(providerUserId))
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var acl = _dbContext.CircleAuthorizationToFile.SingleOrDefault(a =>
|
|
||||||
a.CircleId == circleId && a.Path == normalizedFullPath && a.OwnerId == providerUserId);
|
|
||||||
|
|
||||||
if (access == FileAccessRight.None)
|
|
||||||
{
|
|
||||||
if (acl != null)
|
|
||||||
{
|
|
||||||
_dbContext.CircleAuthorizationToFile.Remove(acl);
|
|
||||||
}
|
|
||||||
|
|
||||||
_dbContext.SaveChanges();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (acl == null)
|
|
||||||
{
|
|
||||||
_dbContext.CircleAuthorizationToFile.Add(new CircleAuthorizationToFile
|
|
||||||
{
|
|
||||||
CircleId = circleId,
|
|
||||||
Path = normalizedFullPath,
|
|
||||||
OwnerId = providerUserId,
|
|
||||||
Access = access
|
|
||||||
});
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
acl.Access = access;
|
|
||||||
}
|
|
||||||
|
|
||||||
_dbContext.SaveChanges();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue