Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix ActualPrincipalSource #256

Merged
merged 1 commit into from
Oct 20, 2023
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
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
using Framework.Authorization.Domain;
using Framework.Core;

namespace Framework.Authorization.SecuritySystem;

public class ActualPrincipalSource : IActualPrincipalSource
{
private readonly Principal currentPrincipal;
private readonly ICurrentPrincipalSource currentPrincipalSource;

public ActualPrincipalSource(ICurrentPrincipalSource currentPrincipalSource)
{
this.currentPrincipal = currentPrincipalSource.CurrentPrincipal;
this.currentPrincipalSource = currentPrincipalSource;
}

public Principal ActualPrincipal => this.currentPrincipal.RunAs ?? this.currentPrincipal;
public Principal ActualPrincipal => this.currentPrincipalSource.CurrentPrincipal.Pipe(v => v.RunAs ?? v);
}
6 changes: 3 additions & 3 deletions src/__SolutionItems/CommonAssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
[assembly: AssemblyCompany("Luxoft")]
[assembly: AssemblyCopyright("Copyright © Luxoft 2009-2023")]

[assembly: AssemblyVersion("19.1.6.0")]
[assembly: AssemblyFileVersion("19.1.6.0")]
[assembly: AssemblyInformationalVersion("19.1.6.0")]
[assembly: AssemblyVersion("19.1.7.0")]
[assembly: AssemblyFileVersion("19.1.7.0")]
[assembly: AssemblyInformationalVersion("19.1.7.0")]

#if DEBUG
[assembly: AssemblyConfiguration("Debug")]
Expand Down
Loading