Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions src/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,15 @@
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="IvAt.CommonFramework.RelativePath" Version="2.0.4" />
<PackageVersion Include="IvAt.CommonFramework.VisualIdentitySource" Version="2.0.4" />
<PackageVersion Include="IvAt.GenericQueryable.EntityFramework" Version="2.0.6" />
<PackageVersion Include="IvAt.HierarchicalExpand" Version="2.0.6" />
<PackageVersion Include="IvAt.HierarchicalExpand.Abstractions" Version="2.0.6" />
<PackageVersion Include="IvAt.CommonFramework.GenericRepository" Version="2.1.6" />
<PackageVersion Include="IvAt.CommonFramework.IdentitySource.Abstractions" Version="2.1.6" />
<PackageVersion Include="IvAt.CommonFramework.RelativePath" Version="2.1.6" />
<PackageVersion Include="IvAt.CommonFramework.VisualIdentitySource" Version="2.1.6" />
<PackageVersion Include="IvAt.CommonFramework.VisualIdentitySource.Abstractions" Version="2.1.6" />
<PackageVersion Include="IvAt.GenericQueryable.Abstractions" Version="2.1.6" />
<PackageVersion Include="IvAt.GenericQueryable.EntityFramework" Version="2.1.6" />
<PackageVersion Include="IvAt.HierarchicalExpand" Version="2.1.6" />
<PackageVersion Include="IvAt.HierarchicalExpand.Abstractions" Version="2.1.6" />
<PackageVersion Include="Microsoft.AspNetCore.Authentication.Negotiate" Version="10.0.2" />
<PackageVersion Include="Microsoft.AspNetCore.Http" Version="2.3.9" />
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="9.0.6" />
Expand All @@ -17,14 +21,14 @@
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="10.0.2" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="10.0.2" />
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="10.0.2" />
<PackageVersion Include="Swashbuckle.AspNetCore" Version="10.1.0" />
<PackageVersion Include="Swashbuckle.AspNetCore" Version="10.1.1" />
</ItemGroup>
<!-- Tests -->
<ItemGroup>
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="18.0.1" />
<PackageVersion Include="FluentValidation" Version="12.0.0" />
<PackageVersion Include="FluentAssertions" Version="8.8.0" />
<PackageVersion Include="NSubstitute" Version="5.3.0" />
<PackageVersion Include="xunit.v3" Version="3.2.1" />
<PackageVersion Include="xunit.v3" Version="3.2.2" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,10 @@ public NonExpandedRoleGroupSecurityRule(IEnumerable<NonExpandedRolesSecurityRule
: this(children.ToArray())
{
}

public override string ToString() => this.Children.Count == 1
? this.Children.Single().ToString()
: $"[{this.Children.Join(", ", sr => sr.ToString())}]";
}

public record ExpandedRoleGroupSecurityRule(DeepEqualsCollection<ExpandedRolesSecurityRule> Children) : RoleBaseSecurityRule
Expand All @@ -141,6 +145,10 @@ public ExpandedRoleGroupSecurityRule(IEnumerable<ExpandedRolesSecurityRule> chil

public IEnumerable<ExpandedRolesSecurityRule> GetActualChildren() =>
this.HasDefaultCustoms() ? this.Children : this.Children.Select(c => c.ApplyCustoms(this));

public override string ToString() => this.Children.Count == 1
? this.Children.Single().ToString()
: $"[{this.Children.Join(", ", sr => sr.ToString())}]";
}

public record OperationSecurityRule(SecurityOperation SecurityOperation) : RoleBaseSecurityRule
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@

<ItemGroup>
<PackageReference Include="IvAt.HierarchicalExpand.Abstractions" />

<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\SecuritySystem.Domain\SecuritySystem.Domain.csproj" />
</ItemGroup>

</Project>
8 changes: 8 additions & 0 deletions src/SecuritySystem.Domain/SecuritySystem.Domain.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<PackageId>IvAt.SecuritySystem.Domain</PackageId>
<RootNamespace>SecuritySystem</RootNamespace>
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

using System.Linq.Expressions;

using CommonFramework.DependencyInjection;
using CommonFramework;
using CommonFramework.ExpressionEvaluate;
using CommonFramework.GenericRepository;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using CommonFramework.GenericRepository;
using CommonFramework.IdentitySource;
using CommonFramework.VisualIdentitySource;
using CommonFramework.DependencyInjection;

using SecuritySystem.ExternalSystem;
using SecuritySystem.Services;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using CommonFramework;
using CommonFramework.DependencyInjection;
using CommonFramework.IdentitySource;

using GenericQueryable;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using CommonFramework.DependencyInjection;
using CommonFramework;

using SecuritySystem.ExternalSystem;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using CommonFramework;
using CommonFramework.DependencyInjection;
using CommonFramework.GenericRepository;
using CommonFramework.VisualIdentitySource;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using CommonFramework;
using CommonFramework.DependencyInjection;
using CommonFramework.GenericRepository;
using CommonFramework.IdentitySource;
using CommonFramework.VisualIdentitySource;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using CommonFramework;
using CommonFramework.DependencyInjection;
using CommonFramework.GenericRepository;
using CommonFramework.IdentitySource;
using CommonFramework.VisualIdentitySource;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using CommonFramework;
using CommonFramework.DependencyInjection;

using SecuritySystem.ExternalSystem.Management;
using SecuritySystem.Services;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using CommonFramework;
using CommonFramework.DependencyInjection;
using CommonFramework.GenericRepository;

using SecuritySystem.Services;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using CommonFramework;
using CommonFramework.IdentitySource;
using CommonFramework.DependencyInjection;

using SecuritySystem.Services;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using CommonFramework;
using CommonFramework.DependencyInjection;
using CommonFramework.GenericRepository;

using GenericQueryable;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using CommonFramework.DependencyInjection;
using CommonFramework;

namespace SecuritySystem.GeneralPermission;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using CommonFramework;
using CommonFramework.DependencyInjection;

using SecuritySystem.Services;

namespace SecuritySystem.GeneralPermission;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
using System.Linq.Expressions;

using CommonFramework;
using CommonFramework.DependencyInjection;
using CommonFramework.IdentitySource;

using SecuritySystem.Services;

namespace SecuritySystem.GeneralPermission;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using CommonFramework;
using CommonFramework.IdentitySource;
using CommonFramework.DependencyInjection;

using SecuritySystem.Services;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using CommonFramework.DependencyInjection;
using CommonFramework;

using SecuritySystem.Services;

namespace SecuritySystem.GeneralPermission;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using CommonFramework;
using CommonFramework.DependencyInjection;
using CommonFramework.IdentitySource;

namespace SecuritySystem.GeneralPermission;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using CommonFramework.DependencyInjection;
using CommonFramework;

namespace SecuritySystem.GeneralPermission;

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<PackageId>IvAt.SecuritySystem.GeneralPermission.Runtime</PackageId>
<RootNamespace>SecuritySystem.GeneralPermission</RootNamespace>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\SecuritySystem.Runtime\SecuritySystem.Runtime.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using CommonFramework;
using CommonFramework.DependencyInjection;
using CommonFramework.VisualIdentitySource;

using SecuritySystem.ExternalSystem.Management;
using SecuritySystem.ExternalSystem.SecurityContextStorage;
using SecuritySystem.Services;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using CommonFramework;
using CommonFramework.DependencyInjection;
using CommonFramework.IdentitySource;

using SecuritySystem.ExternalSystem.Management;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using CommonFramework;
using CommonFramework.DependencyInjection;
using CommonFramework.IdentitySource;

using SecuritySystem.Validation;

namespace SecuritySystem.GeneralPermission.Validation.PermissionRestriction;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using CommonFramework.DependencyInjection;
using CommonFramework;

using SecuritySystem.Validation;

namespace SecuritySystem.GeneralPermission.Validation.PermissionRestriction;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using CommonFramework.DependencyInjection;
using CommonFramework;

using SecuritySystem.ExternalSystem.SecurityContextStorage;
using SecuritySystem.Validation;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\SecuritySystem.GeneralPermission.Runtime\SecuritySystem.GeneralPermission.Runtime.csproj" />
<ProjectReference Include="..\SecuritySystem\SecuritySystem.csproj" />
</ItemGroup>

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using CommonFramework;
using CommonFramework.DependencyInjection;
using CommonFramework.ExpressionEvaluate;
using CommonFramework.IdentitySource;

Expand Down Expand Up @@ -36,7 +35,7 @@
IExpressionEvaluatorStorage expressionEvaluatorStorage,
IPermissionSystem<TPermission> permissionSystem,
IHierarchicalObjectExpanderFactory hierarchicalObjectExpanderFactory) :
FilterBuilderFactoryBase<TDomainObject, AccessorsFilterBuilder<TDomainObject, TPermission>>(identityInfoSource),

Check warning on line 38 in src/SecuritySystem.Runtime/Builders/AccessorsBuilder/AccessorsFilterBuilderFactory.cs

View workflow job for this annotation

GitHub Actions / build

Parameter 'IIdentityInfoSource identityInfoSource' is captured into the state of the enclosing type and its value is also passed to the base constructor. The value might be captured by the base class as well.

Check warning on line 38 in src/SecuritySystem.Runtime/Builders/AccessorsBuilder/AccessorsFilterBuilderFactory.cs

View workflow job for this annotation

GitHub Actions / build

Parameter 'IIdentityInfoSource identityInfoSource' is captured into the state of the enclosing type and its value is also passed to the base constructor. The value might be captured by the base class as well.
IAccessorsFilterFactory<TDomainObject>
{
public AccessorsFilterInfo<TDomainObject> CreateFilter(
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using CommonFramework;
using CommonFramework.DependencyInjection;
using CommonFramework.ExpressionEvaluate;
using CommonFramework.IdentitySource;

Expand Down Expand Up @@ -46,7 +45,7 @@
IExpressionEvaluatorStorage expressionEvaluatorStorage,
IPermissionSystem<TPermission> permissionSystem,
IHierarchicalObjectExpanderFactory hierarchicalObjectExpanderFactory) :
FilterBuilderFactoryBase<TDomainObject, SecurityFilterBuilder<TDomainObject, TPermission>>(identityInfoSource),

Check warning on line 48 in src/SecuritySystem.Runtime/Builders/QueryBuilder/SecurityFilterBuilderFactory.cs

View workflow job for this annotation

GitHub Actions / build

Parameter 'IIdentityInfoSource identityInfoSource' is captured into the state of the enclosing type and its value is also passed to the base constructor. The value might be captured by the base class as well.

Check warning on line 48 in src/SecuritySystem.Runtime/Builders/QueryBuilder/SecurityFilterBuilderFactory.cs

View workflow job for this annotation

GitHub Actions / build

Parameter 'IIdentityInfoSource identityInfoSource' is captured into the state of the enclosing type and its value is also passed to the base constructor. The value might be captured by the base class as well.
ISecurityFilterFactory<TDomainObject>
{
private readonly IExpressionEvaluator expressionEvaluator = expressionEvaluatorStorage.GetForType(typeof(SecurityFilterBuilderFactory<TDomainObject, TPermission>));
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using CommonFramework.DependencyInjection;
using CommonFramework;
using CommonFramework.IdentitySource;

using SecuritySystem.DomainServices.DependencySecurity._Base;
using SecuritySystem.Expanders;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using CommonFramework;
using CommonFramework.DependencyInjection;
using CommonFramework.DictionaryCache;
using CommonFramework.IdentitySource;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
using SecuritySystem.Services;

using System.Collections.Concurrent;

using CommonFramework.DependencyInjection;
using CommonFramework;

// ReSharper disable once CheckNamespace
namespace SecuritySystem;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System.Linq.Expressions;

using CommonFramework;
using CommonFramework.DependencyInjection;

// ReSharper disable once CheckNamespace
namespace SecuritySystem;
Expand Down Expand Up @@ -107,7 +106,7 @@

var method = func.Method.GetGenericMethodDefinition().MakeGenericMethod(args);

return method.Invoke<SecurityPath<TDomainObject>>(this, securityPath, securityContextRestrictions);

Check warning on line 109 in src/SecuritySystem.Runtime/SecurityPath/SecurityPathRestrictionService.cs

View workflow job for this annotation

GitHub Actions / build

Argument of type 'IReadOnlyList<SecurityContextRestriction>' cannot be used for parameter 'args' of type 'object?[]' in 'SecurityPath<TDomainObject> extension(MethodInfo).Invoke<SecurityPath<TDomainObject>>(object? source, object? arg1, params object?[] args)' due to differences in the nullability of reference types.
}
else if (securityPath is SecurityPath<TDomainObject>.AndSecurityPath andSecurityPath)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
using CommonFramework.DependencyInjection;
using CommonFramework;

using SecuritySystem.Services;

using System.Collections.Concurrent;

// ReSharper disable once CheckNamespace
namespace SecuritySystem;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@


namespace SecuritySystem.SecurityRuleInfo;
namespace SecuritySystem.SecurityRuleInfo;

public class ClientDomainModeSecurityRuleSource(IEnumerable<DomainModeSecurityRuleInfo> domainModeSecurityRuleInfoList)
: IClientDomainModeSecurityRuleSource
Expand Down
21 changes: 21 additions & 0 deletions src/SecuritySystem.Runtime/SecuritySystem.Runtime.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<PackageId>IvAt.SecuritySystem.Runtime</PackageId>
<RootNamespace>SecuritySystem</RootNamespace>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="IvAt.CommonFramework.GenericRepository" />
<PackageReference Include="IvAt.CommonFramework.RelativePath" />

<PackageReference Include="IvAt.CommonFramework.IdentitySource.Abstractions" />
<PackageReference Include="IvAt.CommonFramework.VisualIdentitySource.Abstractions" />
<PackageReference Include="IvAt.GenericQueryable.Abstractions" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\SecuritySystem.Abstractions\SecuritySystem.Abstractions.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System.Linq.Expressions;

using CommonFramework;
using CommonFramework.DependencyInjection;
using CommonFramework.VisualIdentitySource;

using SecuritySystem.Credential;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using CommonFramework.DependencyInjection;
using CommonFramework;

namespace SecuritySystem.Services;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using System.Linq.Expressions;

using CommonFramework;
using CommonFramework.DependencyInjection;
using CommonFramework.ExpressionEvaluate;
using CommonFramework.IdentitySource;
using CommonFramework.VisualIdentitySource;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System.Linq.Expressions;

using CommonFramework;
using CommonFramework.DependencyInjection;
using CommonFramework.ExpressionEvaluate;

using Microsoft.Extensions.DependencyInjection;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
using System.Linq.Expressions;
using CommonFramework.DependencyInjection;
using CommonFramework;
using CommonFramework.ExpressionEvaluate;
using CommonFramework.IdentitySource;
using CommonFramework.VisualIdentitySource;

using SecuritySystem.ExternalSystem.Management;

using System.Linq.Expressions;

namespace SecuritySystem.Services;

public class ManagedPrincipalHeaderConverter<TPrincipal>(
Expand Down
Loading
Loading