mirror of
https://github.com/bitwarden/server
synced 2025-12-23 19:53:40 +00:00
Tweak provider views (#1499)
* Add Organizations to provider views Remove enabled/disabled toggle from provider. It's currently not used. * Remove provider Delete There are implications to deleting providers on the organizations they manage. We want to think through this flow before allowing delete from the admin portal. * Use toastr to display production exception messages. Update build actions to upgrade npm to v7. Use a custom error handler in production which displays a toast of the exception message and redirect to the offending page * Clarify provider create error message
This commit is contained in:
24
src/Admin/Controllers/ErrorController.cs
Normal file
24
src/Admin/Controllers/ErrorController.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using Microsoft.AspNetCore.Diagnostics;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace Bit.Admin.Controllers
|
||||
{
|
||||
public class ErrorController : Controller
|
||||
{
|
||||
[Route("/error")]
|
||||
public IActionResult Error(int? statusCode = null)
|
||||
{
|
||||
var exceptionHandlerPathFeature = HttpContext.Features.Get<IExceptionHandlerPathFeature>();
|
||||
TempData["Error"] = HttpContext.Features.Get<IExceptionHandlerFeature>()?.Error.Message;
|
||||
|
||||
if (exceptionHandlerPathFeature != null)
|
||||
{
|
||||
return Redirect(exceptionHandlerPathFeature.Path);
|
||||
}
|
||||
else
|
||||
{
|
||||
return Redirect("/Home");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user