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,26 +36,6 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
return View(mmc);
}
// GET: Admin/Mmc/Create
public IActionResult Create() => View();
// POST: Admin/Mmc/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,ModeSense2AData")] Mmc mmc)
{
if(ModelState.IsValid)
{
_context.Add(mmc);
await _context.SaveChangesAsync();
return RedirectToAction(nameof(Index));
}
return View(mmc);
}
// GET: Admin/Mmc/Edit/5
public async Task<IActionResult> Edit(int? id)
{