Do not allow editing ATA IDENTIFY responses.

This commit is contained in:
2019-11-08 01:16:20 +00:00
parent 0ff7684370
commit 86ae22c42f
3 changed files with 1 additions and 107 deletions

View File

@@ -67,57 +67,6 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
return View(ata);
}
// GET: Admin/Atas/Edit/5
public async Task<IActionResult> Edit(int? id)
{
if (id == null)
{
return NotFound();
}
var ata = await _context.Ata.FindAsync(id);
if (ata == null)
{
return NotFound();
}
return View(ata);
}
// POST: Admin/Atas/Edit/5
// 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> Edit(int id, [Bind("Id,Identify")] DiscImageChef.CommonTypes.Metadata.Ata ata)
{
if (id != ata.Id)
{
return NotFound();
}
if (ModelState.IsValid)
{
try
{
_context.Update(ata);
await _context.SaveChangesAsync();
}
catch (DbUpdateConcurrencyException)
{
if (!AtaExists(ata.Id))
{
return NotFound();
}
else
{
throw;
}
}
return RedirectToAction(nameof(Index));
}
return View(ata);
}
// GET: Admin/Atas/Delete/5
public async Task<IActionResult> Delete(int? id)
{