Skip to content

Commit f732af8

Browse files
Added authorization attribute to base controller
1 parent 01a1da1 commit f732af8

17 files changed

+22
-37
lines changed

DeveloperTools/Controllers/DeveloperToolsController.cs

Lines changed: 0 additions & 19 deletions
This file was deleted.

DeveloperTools/Controllers/LocalObjectCacheController.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
using System.Runtime.Serialization.Formatters.Binary;
77
using DeveloperTools.Models;
88
using EPiServer.Core;
9+
using EPiServer.DeveloperTools.Features.Common;
910
using EPiServer.Framework.Cache;
1011
using Microsoft.AspNetCore.Http;
1112
using Microsoft.AspNetCore.Mvc;

DeveloperTools/Controllers/LogViewerController.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using DeveloperTools.Models;
2+
using EPiServer.DeveloperTools.Features.Common;
23
using Microsoft.AspNetCore.Mvc;
34

45
namespace DeveloperTools.Controllers

DeveloperTools/Controllers/MemoryDumpController.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using System.IO;
44
using System.Runtime.InteropServices;
55
using DeveloperTools.Models;
6+
using EPiServer.DeveloperTools.Features.Common;
67
using EPiServer.Web;
78
using Microsoft.AspNetCore.Mvc;
89

DeveloperTools/Controllers/ModuleDependenciesController.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
using System.Linq;
55
using System.Reflection;
66
using DeveloperTools.Models;
7+
using EPiServer.DeveloperTools.Features.Common;
78
using EPiServer.Framework.Initialization;
89
using EPiServer.ServiceLocation;
910
using Microsoft.AspNetCore.Mvc;

DeveloperTools/Controllers/RevertToDefaultController.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
using System.Collections.Generic;
33
using System.Linq;
44
using EPiServer.DataAbstraction;
5+
using EPiServer.DeveloperTools.Features.Common;
56
using EPiServer.ServiceLocation;
67
using Microsoft.AspNetCore.Mvc;
78

DeveloperTools/Controllers/ViewEngineLocationsController.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
using System.Linq;
33
using System.Reflection;
44
using DeveloperTools.Models;
5+
using EPiServer.DeveloperTools.Features.Common;
56
using EPiServer.Shell.Web.Mvc;
67
using Microsoft.AspNetCore.Mvc;
78
using Microsoft.AspNetCore.Mvc.Razor;

DeveloperTools/EPiServer.DeveloperTools.Views/Views/Routes/Index.cshtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
<tbody>
3535
@foreach (var entry in Model)
3636
{
37-
<tr @(entry.IsSelected ? "style='background-color:LightGreen'" : string.Empty)>
37+
<tr>
3838
<td>@entry.Order</td>
3939
<td>@entry.Name</td>
4040
<td>@entry.Url</td>

DeveloperTools/Features/AppEnvironment/AppEnvironmentController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
using System.Diagnostics;
44
using System.Linq;
55
using System.Reflection;
6-
using DeveloperTools.Controllers;
6+
using EPiServer.DeveloperTools.Features.Common;
77
using Microsoft.AspNetCore.Hosting;
88
using Microsoft.AspNetCore.Mvc;
99
using Microsoft.Data.SqlClient;
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
using Microsoft.AspNetCore.Authorization;
2+
using Microsoft.AspNetCore.Mvc;
3+
4+
namespace EPiServer.DeveloperTools.Features.Common;
5+
6+
[Authorize(Constants.PolicyName)]
7+
public class DeveloperToolsController : Controller { }

0 commit comments

Comments
 (0)