1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-22 12:15:36 +01:00

Fix Return to Vault button

This commit is contained in:
Thomas Rittson 2021-07-02 14:44:58 +10:00
parent 86a12efa76
commit de625894cf
2 changed files with 13 additions and 2 deletions

View File

@ -2,17 +2,21 @@
using Bit.Portal.Utilities; using Bit.Portal.Utilities;
using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Bit.Core.Settings;
namespace Bit.Portal.Controllers namespace Bit.Portal.Controllers
{ {
public class AuthController : Controller public class AuthController : Controller
{ {
private readonly EnterprisePortalTokenSignInManager _signInManager; private readonly EnterprisePortalTokenSignInManager _signInManager;
private readonly GlobalSettings _globalSettings;
public AuthController( public AuthController(
EnterprisePortalTokenSignInManager signInManager) EnterprisePortalTokenSignInManager signInManager,
GlobalSettings globalSettings)
{ {
_signInManager = signInManager; _signInManager = signInManager;
_globalSettings = globalSettings;
} }
[HttpGet("~/login")] [HttpGet("~/login")]
@ -59,5 +63,12 @@ namespace Bit.Portal.Controllers
{ {
return View(); return View();
} }
[HttpGet("~/vault")]
public async Task<RedirectResult> Vault()
{
await _signInManager.SignOutAsync();
return Redirect(_globalSettings.BaseServiceUri.Vault);
}
} }
} }

View File

@ -71,7 +71,7 @@
</div> </div>
</div> </div>
<div class="dropdown-divider"></div> <div class="dropdown-divider"></div>
<a class="dropdown-item" href="#"> <a class="dropdown-item" asp-area="" asp-controller="Auth" asp-action="Vault">
<i class="fa fa-fw fa-share fa-flip-horizontal" aria-hidden="true"></i> <i class="fa fa-fw fa-share fa-flip-horizontal" aria-hidden="true"></i>
Return to My Vault Return to My Vault
</a> </a>