@@ -28,22 +28,6 @@ public SettingsController(IUnitOfWork db, ILogger<SettingsController> logger)
2828 _theme = $ "~/{ ApplicationSettings . BlogAdminFolder } /Settings/";
2929 }
3030
31- [ VerifyProfile ]
32- [ Route ( "application" ) ]
33- public IActionResult Application ( int page = 1 )
34- {
35- var pager = new Pager ( page ) ;
36- var blogs = _db . Profiles . ProfileList ( p => p . Id > 0 , pager ) ;
37-
38- var model = new AdminApplicationModel
39- {
40- Profile = GetProfile ( ) ,
41- Blogs = blogs ,
42- Pager = pager
43- } ;
44- return View ( _theme + "Application.cshtml" , model ) ;
45- }
46-
4731 [ Route ( "profile" ) ]
4832 public IActionResult Profile ( )
4933 {
@@ -110,21 +94,14 @@ public IActionResult Profile(SettingsProfile model)
11094 return View ( _theme + "Profile.cshtml" , model ) ;
11195 }
11296
113- [ VerifyProfile ]
114- [ Route ( "import" ) ]
115- public IActionResult Import ( )
116- {
117- return View ( _theme + "Import.cshtml" , new AdminBaseModel { Profile = GetProfile ( ) } ) ;
118- }
119-
12097 [ VerifyProfile ]
12198 [ Route ( "about" ) ]
12299 public IActionResult About ( )
123100 {
124101 return View ( _theme + "About.cshtml" , new AdminBaseModel { Profile = GetProfile ( ) } ) ;
125102 }
126103
127- [ VerifyProfile ]
104+ [ MustBeAdmin ]
128105 [ Route ( "general" ) ]
129106 public IActionResult General ( )
130107 {
@@ -149,6 +126,7 @@ public IActionResult General()
149126 }
150127
151128 [ HttpPost ]
129+ [ MustBeAdmin ]
152130 [ Route ( "general" ) ]
153131 public IActionResult General ( SettingsGeneral model )
154132 {
@@ -184,7 +162,7 @@ public IActionResult General(SettingsGeneral model)
184162 return View ( _theme + "General.cshtml" , model ) ;
185163 }
186164
187- [ VerifyProfile ]
165+ [ MustBeAdmin ]
188166 [ Route ( "posts" ) ]
189167 public IActionResult Posts ( )
190168 {
@@ -201,6 +179,7 @@ public IActionResult Posts()
201179 }
202180
203181 [ HttpPost ]
182+ [ MustBeAdmin ]
204183 [ Route ( "posts" ) ]
205184 public IActionResult Posts ( SettingsPosts model )
206185 {
@@ -223,7 +202,7 @@ public IActionResult Posts(SettingsPosts model)
223202 return View ( _theme + "Posts.cshtml" , model ) ;
224203 }
225204
226- [ VerifyProfile ]
205+ [ MustBeAdmin ]
227206 [ Route ( "advanced" ) ]
228207 public IActionResult Advanced ( )
229208 {
0 commit comments