Do not allow creation of entities from admin pages.

This commit is contained in:
2019-11-08 20:38:06 +00:00
parent 8db64d17ae
commit 2fdeb744b6
62 changed files with 0 additions and 4179 deletions

View File

@@ -36,29 +36,6 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
return View(supportedDensity);
}
// GET: Admin/SupportedDensities/Create
public IActionResult Create() => View();
// POST: Admin/SupportedDensities/Create
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
// more details see http://go.microsoft.com/fwlink/?LinkId=317598.
[HttpPost, ValidateAntiForgeryToken]
public async Task<IActionResult> Create(
[Bind(
"Id,PrimaryCode,SecondaryCode,Writable,Duplicate,DefaultDensity,BitsPerMm,Width,Tracks,Capacity,Organization,Name,Description")]
SupportedDensity supportedDensity)
{
if(ModelState.IsValid)
{
_context.Add(supportedDensity);
await _context.SaveChangesAsync();
return RedirectToAction(nameof(Index));
}
return View(supportedDensity);
}
// GET: Admin/SupportedDensities/Edit/5
public async Task<IActionResult> Edit(int? id)
{