prevent non admin to go to server pages

This commit is contained in:
NicolasDorier
2017-09-16 01:20:57 +09:00
parent eb9f669224
commit 99ae549c24

View File

@@ -1,5 +1,6 @@
using BTCPayServer.Models;
using BTCPayServer.Models.ServerViewModels;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using System;
@@ -9,6 +10,7 @@ using System.Threading.Tasks;
namespace BTCPayServer.Controllers
{
[Authorize(Roles=Roles.ServerAdmin)]
public class ServerController : Controller
{
private UserManager<ApplicationUser> _UserManager;