using Aquila_1.Models; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; [Authorize(Policy = "AdminOnly")] public class SettingsController : Controller { public IActionResult Index() { var settings = new SettingsViewModel { Setting1 = "Default Value", Setting2 = false, Setting3 = "Default Value" }; return View(settings); } [HttpPost] public IActionResult Index(SettingsViewModel model) { if (ModelState.IsValid) { // Save settings logic here return RedirectToAction("Index", "Home"); } return View(model); } }