Skip to content

Commit

Permalink
Merge branch 'release/6.16.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
vc-ci committed May 19, 2023
2 parents 8e91997 + 017ddbb commit 2ba8301
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<Authors>VirtoCommerce</Authors>
</PropertyGroup>
<PropertyGroup>
<VersionPrefix>6.15.0</VersionPrefix>
<VersionPrefix>6.16.0</VersionPrefix>
<VersionSuffix></VersionSuffix>
<VersionSuffix Condition=" '$(VersionSuffix)' != '' AND '$(BuildNumber)' != '' ">$(VersionSuffix)-$(BuildNumber)</VersionSuffix>
</PropertyGroup>
Expand Down
5 changes: 3 additions & 2 deletions VirtoCommerce.Storefront/Controllers/AccountController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,10 @@ public AccountController(
[HttpGet("impersonate/{userId}")]
public async Task<IActionResult> ImpersonateUser(string userId)
{
if (User.Identity.Name == SecurityConstants.AnonymousUsername || User.Claims.Any(x => x.Type == SecurityConstants.Claims.OperatorUserNameClaimType))
if (User.Identity.Name == SecurityConstants.AnonymousUsername ||
User.Claims.Any(x => x.Type == SecurityConstants.Claims.OperatorUserNameClaimType))
{
return StoreFrontRedirect($"~/sign-in?redirect={System.Uri.EscapeDataString(Request.Path)}");
return StoreFrontRedirect($"~/sign-in?returnUrl={System.Uri.EscapeDataString(Request.Path)}");
}

var authorizationResult = await _authorizationService.AuthorizeAsync(User, null, CanImpersonateAuthorizationRequirement.PolicyName);
Expand Down

0 comments on commit 2ba8301

Please sign in to comment.