mirror of
https://github.com/aaru-dps/Aaru.Server.git
synced 2025-12-16 19:24:27 +00:00
Do not allow editing ATA IDENTIFY responses.
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user