mirror of
https://github.com/aaru-dps/Aaru.Server.git
synced 2025-12-16 19:24:27 +00:00
Do not allow creation of entities from admin pages.
This commit is contained in:
@@ -36,25 +36,6 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
return View(ata);
|
||||
}
|
||||
|
||||
// GET: Admin/Atas/Create
|
||||
public IActionResult Create() => View();
|
||||
|
||||
// POST: Admin/Atas/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,Identify")] CommonTypes.Metadata.Ata ata)
|
||||
{
|
||||
if(ModelState.IsValid)
|
||||
{
|
||||
_context.Add(ata);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
return View(ata);
|
||||
}
|
||||
|
||||
// GET: Admin/Atas/Delete/5
|
||||
public async Task<IActionResult> Delete(int? id)
|
||||
|
||||
@@ -36,27 +36,6 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
return View(blockDescriptor);
|
||||
}
|
||||
|
||||
// GET: Admin/BlockDescriptors/Create
|
||||
public IActionResult Create() => View();
|
||||
|
||||
// POST: Admin/BlockDescriptors/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,Density,Blocks,BlockLength")]
|
||||
BlockDescriptor blockDescriptor)
|
||||
{
|
||||
if(ModelState.IsValid)
|
||||
{
|
||||
_context.Add(blockDescriptor);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
return View(blockDescriptor);
|
||||
}
|
||||
|
||||
// GET: Admin/BlockDescriptors/Edit/5
|
||||
public async Task<IActionResult> Edit(int? id)
|
||||
{
|
||||
|
||||
@@ -36,26 +36,6 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
return View(chs);
|
||||
}
|
||||
|
||||
// GET: Admin/Chs/Create
|
||||
public IActionResult Create() => View();
|
||||
|
||||
// POST: Admin/Chs/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,Cylinders,Heads,Sectors")] Chs chs)
|
||||
{
|
||||
if(ModelState.IsValid)
|
||||
{
|
||||
_context.Add(chs);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
return View(chs);
|
||||
}
|
||||
|
||||
// GET: Admin/Chs/Edit/5
|
||||
public async Task<IActionResult> Edit(int? id)
|
||||
{
|
||||
|
||||
@@ -35,26 +35,6 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
return View(command);
|
||||
}
|
||||
|
||||
// GET: Admin/Commands/Create
|
||||
public IActionResult Create() => View();
|
||||
|
||||
// POST: Admin/Commands/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,Name,Count")] Command command)
|
||||
{
|
||||
if(ModelState.IsValid)
|
||||
{
|
||||
_context.Add(command);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
return View(command);
|
||||
}
|
||||
|
||||
// GET: Admin/Commands/Edit/5
|
||||
public async Task<IActionResult> Edit(int? id)
|
||||
{
|
||||
|
||||
@@ -35,28 +35,6 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
return View(compactDiscOffset);
|
||||
}
|
||||
|
||||
// GET: Admin/CompactDiscOffsets/Create
|
||||
public IActionResult Create() => View();
|
||||
|
||||
// POST: Admin/CompactDiscOffsets/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,AddedWhen,ModifiedWhen,Manufacturer,Model,Offset,Submissions,Agreement")]
|
||||
CompactDiscOffset compactDiscOffset)
|
||||
{
|
||||
if(ModelState.IsValid)
|
||||
{
|
||||
_context.Add(compactDiscOffset);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
return View(compactDiscOffset);
|
||||
}
|
||||
|
||||
// GET: Admin/CompactDiscOffsets/Edit/5
|
||||
public async Task<IActionResult> Edit(int? id)
|
||||
{
|
||||
|
||||
@@ -36,26 +36,6 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
return View(densityCode);
|
||||
}
|
||||
|
||||
// GET: Admin/DensityCodes/Create
|
||||
public IActionResult Create() => View();
|
||||
|
||||
// POST: Admin/DensityCodes/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,Code")] DensityCode densityCode)
|
||||
{
|
||||
if(ModelState.IsValid)
|
||||
{
|
||||
_context.Add(densityCode);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
return View(densityCode);
|
||||
}
|
||||
|
||||
// GET: Admin/DensityCodes/Edit/5
|
||||
public async Task<IActionResult> Edit(int? id)
|
||||
{
|
||||
|
||||
@@ -35,27 +35,6 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
return View(deviceStat);
|
||||
}
|
||||
|
||||
// GET: Admin/DeviceStats/Create
|
||||
public IActionResult Create() => View();
|
||||
|
||||
// POST: Admin/DeviceStats/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,Manufacturer,Model,Revision,Bus")]
|
||||
DeviceStat deviceStat)
|
||||
{
|
||||
if(ModelState.IsValid)
|
||||
{
|
||||
_context.Add(deviceStat);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
return View(deviceStat);
|
||||
}
|
||||
|
||||
// GET: Admin/DeviceStats/Edit/5
|
||||
public async Task<IActionResult> Edit(int? id)
|
||||
{
|
||||
|
||||
@@ -35,28 +35,6 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
return View(device);
|
||||
}
|
||||
|
||||
// GET: Admin/Devices/Create
|
||||
public IActionResult Create() => View();
|
||||
|
||||
// POST: Admin/Devices/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("AddedWhen,ModifiedWhen,OptimalMultipleSectorsRead,Id,CompactFlash,Manufacturer,Model,Revision,Type")]
|
||||
Device device)
|
||||
{
|
||||
if(ModelState.IsValid)
|
||||
{
|
||||
_context.Add(device);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
return View(device);
|
||||
}
|
||||
|
||||
// GET: Admin/Devices/Edit/5
|
||||
public async Task<IActionResult> Edit(int? id)
|
||||
{
|
||||
|
||||
@@ -35,26 +35,6 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
return View(filesystem);
|
||||
}
|
||||
|
||||
// GET: Admin/Filesystems/Create
|
||||
public IActionResult Create() => View();
|
||||
|
||||
// POST: Admin/Filesystems/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,Name,Count")] Filesystem filesystem)
|
||||
{
|
||||
if(ModelState.IsValid)
|
||||
{
|
||||
_context.Add(filesystem);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
return View(filesystem);
|
||||
}
|
||||
|
||||
// GET: Admin/Filesystems/Edit/5
|
||||
public async Task<IActionResult> Edit(int? id)
|
||||
{
|
||||
|
||||
@@ -35,26 +35,6 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
return View(filter);
|
||||
}
|
||||
|
||||
// GET: Admin/Filters/Create
|
||||
public IActionResult Create() => View();
|
||||
|
||||
// POST: Admin/Filters/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,Name,Count")] Filter filter)
|
||||
{
|
||||
if(ModelState.IsValid)
|
||||
{
|
||||
_context.Add(filter);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
return View(filter);
|
||||
}
|
||||
|
||||
// GET: Admin/Filters/Edit/5
|
||||
public async Task<IActionResult> Edit(int? id)
|
||||
{
|
||||
|
||||
@@ -36,27 +36,6 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
return View(fireWire);
|
||||
}
|
||||
|
||||
// GET: Admin/FireWires/Create
|
||||
public IActionResult Create() => View();
|
||||
|
||||
// POST: Admin/FireWires/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,VendorID,ProductID,Manufacturer,Product,RemovableMedia")]
|
||||
FireWire fireWire)
|
||||
{
|
||||
if(ModelState.IsValid)
|
||||
{
|
||||
_context.Add(fireWire);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
return View(fireWire);
|
||||
}
|
||||
|
||||
// GET: Admin/FireWires/Edit/5
|
||||
public async Task<IActionResult> Edit(int? id)
|
||||
{
|
||||
|
||||
@@ -35,26 +35,6 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
return View(mediaFormat);
|
||||
}
|
||||
|
||||
// GET: Admin/MediaFormats/Create
|
||||
public IActionResult Create() => View();
|
||||
|
||||
// POST: Admin/MediaFormats/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,Name,Count")] MediaFormat mediaFormat)
|
||||
{
|
||||
if(ModelState.IsValid)
|
||||
{
|
||||
_context.Add(mediaFormat);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
return View(mediaFormat);
|
||||
}
|
||||
|
||||
// GET: Admin/MediaFormats/Edit/5
|
||||
public async Task<IActionResult> Edit(int? id)
|
||||
{
|
||||
|
||||
@@ -35,26 +35,6 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
return View(media);
|
||||
}
|
||||
|
||||
// GET: Admin/Medias/Create
|
||||
public IActionResult Create() => View();
|
||||
|
||||
// POST: Admin/Medias/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,Type,Real,Count")] Media media)
|
||||
{
|
||||
if(ModelState.IsValid)
|
||||
{
|
||||
_context.Add(media);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
return View(media);
|
||||
}
|
||||
|
||||
// GET: Admin/Medias/Edit/5
|
||||
public async Task<IActionResult> Edit(int? id)
|
||||
{
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -36,29 +36,6 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
return View(mmcFeatures);
|
||||
}
|
||||
|
||||
// GET: Admin/MmcFeatures/Create
|
||||
public IActionResult Create() => View();
|
||||
|
||||
// POST: Admin/MmcFeatures/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,AACSVersion,AGIDs,BindingNonceBlocks,BlocksPerReadableUnit,BufferUnderrunFreeInDVD,BufferUnderrunFreeInSAO,BufferUnderrunFreeInTAO,CanAudioScan,CanEject,CanEraseSector,CanExpandBDRESpareArea,CanFormat,CanFormatBDREWithoutSpare,CanFormatCert,CanFormatFRF,CanFormatQCert,CanFormatRRM,CanGenerateBindingNonce,CanLoad,CanMuteSeparateChannels,CanOverwriteSAOTrack,CanOverwriteTAOTrack,CanPlayCDAudio,CanPseudoOverwriteBDR,CanReadAllDualR,CanReadAllDualRW,CanReadBD,CanReadBDR,CanReadBDRE1,CanReadBDRE2,CanReadBDROM,CanReadBluBCA,CanReadCD,CanReadCDMRW,CanReadCPRM_MKB,CanReadDDCD,CanReadDVD,CanReadDVDPlusMRW,CanReadDVDPlusR,CanReadDVDPlusRDL,CanReadDVDPlusRW,CanReadDVDPlusRWDL,CanReadDriveAACSCertificate,CanReadHDDVD,CanReadHDDVDR,CanReadHDDVDRAM,CanReadLeadInCDText,CanReadOldBDR,CanReadOldBDRE,CanReadOldBDROM,CanReadSpareAreaInformation,CanReportDriveSerial,CanReportMediaSerial,CanTestWriteDDCDR,CanTestWriteDVD,CanTestWriteInSAO,CanTestWriteInTAO,CanUpgradeFirmware,CanWriteBD,CanWriteBDR,CanWriteBDRE1,CanWriteBDRE2,CanWriteBusEncryptedBlocks,CanWriteCDMRW,CanWriteCDRW,CanWriteCDRWCAV,CanWriteCDSAO,CanWriteCDTAO,CanWriteCSSManagedDVD,CanWriteDDCDR,CanWriteDDCDRW,CanWriteDVDPlusMRW,CanWriteDVDPlusR,CanWriteDVDPlusRDL,CanWriteDVDPlusRW,CanWriteDVDPlusRWDL,CanWriteDVDR,CanWriteDVDRDL,CanWriteDVDRW,CanWriteHDDVDR,CanWriteHDDVDRAM,CanWriteOldBDR,CanWriteOldBDRE,CanWritePackedSubchannelInTAO,CanWriteRWSubchannelInSAO,CanWriteRWSubchannelInTAO,CanWriteRaw,CanWriteRawMultiSession,CanWriteRawSubchannelInTAO,ChangerIsSideChangeCapable,ChangerSlots,ChangerSupportsDiscPresent,CPRMVersion,CSSVersion,DBML,DVDMultiRead,EmbeddedChanger,ErrorRecoveryPage,FirmwareDate,LoadingMechanismType,Locked,LogicalBlockSize,MultiRead,PhysicalInterfaceStandardNumber,PreventJumper,SupportsAACS,SupportsBusEncryption,SupportsC2,SupportsCPRM,SupportsCSS,SupportsDAP,SupportsDeviceBusyEvent,SupportsHybridDiscs,SupportsModePage1Ch,SupportsOSSC,SupportsPWP,SupportsSWPP,SupportsSecurDisc,SupportsSeparateVolume,SupportsVCPS,SupportsWriteInhibitDCB,SupportsWriteProtectPAC,VolumeLevels,BinaryData")]
|
||||
MmcFeatures mmcFeatures)
|
||||
{
|
||||
if(ModelState.IsValid)
|
||||
{
|
||||
_context.Add(mmcFeatures);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
return View(mmcFeatures);
|
||||
}
|
||||
|
||||
// GET: Admin/MmcFeatures/Edit/5
|
||||
public async Task<IActionResult> Edit(int? id)
|
||||
{
|
||||
|
||||
@@ -36,27 +36,6 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
return View(mmcSd);
|
||||
}
|
||||
|
||||
// GET: Admin/MmcSds/Create
|
||||
public IActionResult Create() => View();
|
||||
|
||||
// POST: Admin/MmcSds/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,CID,CSD,OCR,SCR,ExtendedCSD")]
|
||||
MmcSd mmcSd)
|
||||
{
|
||||
if(ModelState.IsValid)
|
||||
{
|
||||
_context.Add(mmcSd);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
return View(mmcSd);
|
||||
}
|
||||
|
||||
// GET: Admin/MmcSds/Edit/5
|
||||
public async Task<IActionResult> Edit(int? id)
|
||||
{
|
||||
|
||||
@@ -35,26 +35,6 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
return View(operatingSystem);
|
||||
}
|
||||
|
||||
// GET: Admin/OperatingSystems/Create
|
||||
public IActionResult Create() => View();
|
||||
|
||||
// POST: Admin/OperatingSystems/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,Name,Version,Count")] OperatingSystem operatingSystem)
|
||||
{
|
||||
if(ModelState.IsValid)
|
||||
{
|
||||
_context.Add(operatingSystem);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
return View(operatingSystem);
|
||||
}
|
||||
|
||||
// GET: Admin/OperatingSystems/Edit/5
|
||||
public async Task<IActionResult> Edit(int? id)
|
||||
{
|
||||
|
||||
@@ -35,26 +35,6 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
return View(partition);
|
||||
}
|
||||
|
||||
// GET: Admin/Partitions/Create
|
||||
public IActionResult Create() => View();
|
||||
|
||||
// POST: Admin/Partitions/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,Name,Count")] Partition partition)
|
||||
{
|
||||
if(ModelState.IsValid)
|
||||
{
|
||||
_context.Add(partition);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
return View(partition);
|
||||
}
|
||||
|
||||
// GET: Admin/Partitions/Edit/5
|
||||
public async Task<IActionResult> Edit(int? id)
|
||||
{
|
||||
|
||||
@@ -36,28 +36,6 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
return View(pcmcia);
|
||||
}
|
||||
|
||||
// GET: Admin/Pcmcias/Create
|
||||
public IActionResult Create() => View();
|
||||
|
||||
// POST: Admin/Pcmcias/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,CIS,Compliance,ManufacturerCode,CardCode,Manufacturer,ProductName")]
|
||||
Pcmcia pcmcia)
|
||||
{
|
||||
if(ModelState.IsValid)
|
||||
{
|
||||
_context.Add(pcmcia);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
return View(pcmcia);
|
||||
}
|
||||
|
||||
// GET: Admin/Pcmcias/Edit/5
|
||||
public async Task<IActionResult> Edit(int? id)
|
||||
{
|
||||
|
||||
@@ -35,27 +35,6 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
return View(uploadedReport);
|
||||
}
|
||||
|
||||
// GET: Admin/Reports/Create
|
||||
public IActionResult Create() => View();
|
||||
|
||||
// POST: Admin/Reports/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("UploadedWhen,Id,CompactFlash,Manufacturer,Model,Revision,Type")]
|
||||
UploadedReport uploadedReport)
|
||||
{
|
||||
if(ModelState.IsValid)
|
||||
{
|
||||
_context.Add(uploadedReport);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
return View(uploadedReport);
|
||||
}
|
||||
|
||||
// GET: Admin/Reports/Edit/5
|
||||
public async Task<IActionResult> Edit(int? id)
|
||||
{
|
||||
|
||||
@@ -36,28 +36,6 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
return View(scsiMode);
|
||||
}
|
||||
|
||||
// GET: Admin/ScsiModes/Create
|
||||
public IActionResult Create() => View();
|
||||
|
||||
// POST: Admin/ScsiModes/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,MediumType,WriteProtected,Speed,BufferedMode,BlankCheckEnabled,DPOandFUA")]
|
||||
ScsiMode scsiMode)
|
||||
{
|
||||
if(ModelState.IsValid)
|
||||
{
|
||||
_context.Add(scsiMode);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
return View(scsiMode);
|
||||
}
|
||||
|
||||
// GET: Admin/ScsiModes/Edit/5
|
||||
public async Task<IActionResult> Edit(int? id)
|
||||
{
|
||||
|
||||
@@ -36,26 +36,6 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
return View(scsiPage);
|
||||
}
|
||||
|
||||
// GET: Admin/ScsiPages/Create
|
||||
public IActionResult Create() => View();
|
||||
|
||||
// POST: Admin/ScsiPages/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,page,subpage,value")] ScsiPage scsiPage)
|
||||
{
|
||||
if(ModelState.IsValid)
|
||||
{
|
||||
_context.Add(scsiPage);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
return View(scsiPage);
|
||||
}
|
||||
|
||||
// GET: Admin/ScsiPages/Edit/5
|
||||
public async Task<IActionResult> Edit(int? id)
|
||||
{
|
||||
|
||||
@@ -36,29 +36,6 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
return View(scsi);
|
||||
}
|
||||
|
||||
// GET: Admin/Scsis/Create
|
||||
public IActionResult Create() => View();
|
||||
|
||||
// POST: Admin/Scsis/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,InquiryData,SupportsModeSense6,SupportsModeSense10,SupportsModeSubpages,ModeSense6Data,ModeSense10Data,ModeSense6CurrentData,ModeSense10CurrentData,ModeSense6ChangeableData,ModeSense10ChangeableData")]
|
||||
Scsi scsi)
|
||||
{
|
||||
if(ModelState.IsValid)
|
||||
{
|
||||
_context.Add(scsi);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
return View(scsi);
|
||||
}
|
||||
|
||||
// GET: Admin/Scsis/Edit/5
|
||||
public async Task<IActionResult> Edit(int? id)
|
||||
{
|
||||
|
||||
@@ -36,27 +36,6 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
return View(ssc);
|
||||
}
|
||||
|
||||
// GET: Admin/Sscs/Create
|
||||
public IActionResult Create() => View();
|
||||
|
||||
// POST: Admin/Sscs/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,BlockSizeGranularity,MaxBlockLength,MinBlockLength")]
|
||||
Ssc ssc)
|
||||
{
|
||||
if(ModelState.IsValid)
|
||||
{
|
||||
_context.Add(ssc);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
return View(ssc);
|
||||
}
|
||||
|
||||
// GET: Admin/Sscs/Edit/5
|
||||
public async Task<IActionResult> Edit(int? id)
|
||||
{
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -36,29 +36,6 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
return View(testedMedia);
|
||||
}
|
||||
|
||||
// GET: Admin/TestedMedias/Create
|
||||
public IActionResult Create() => View();
|
||||
|
||||
// POST: Admin/TestedMedias/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,IdentifyData,Blocks,BlockSize,CanReadAACS,CanReadADIP,CanReadATIP,CanReadBCA,CanReadC2Pointers,CanReadCMI,CanReadCorrectedSubchannel,CanReadCorrectedSubchannelWithC2,CanReadDCB,CanReadDDS,CanReadDMI,CanReadDiscInformation,CanReadFullTOC,CanReadHDCMI,CanReadLayerCapacity,CanReadFirstTrackPreGap,CanReadLeadIn,CanReadLeadOut,CanReadMediaID,CanReadMediaSerial,CanReadPAC,CanReadPFI,CanReadPMA,CanReadPQSubchannel,CanReadPQSubchannelWithC2,CanReadPRI,CanReadRWSubchannel,CanReadRWSubchannelWithC2,CanReadRecordablePFI,CanReadSpareAreaInformation,CanReadTOC,Density,LongBlockSize,Manufacturer,MediaIsRecognized,MediumType,MediumTypeName,Model,SupportsHLDTSTReadRawDVD,SupportsNECReadCDDA,SupportsPioneerReadCDDA,SupportsPioneerReadCDDAMSF,SupportsPlextorReadCDDA,SupportsPlextorReadRawDVD,SupportsRead10,SupportsRead12,SupportsRead16,SupportsRead6,SupportsReadCapacity16,SupportsReadCapacity,SupportsReadCd,SupportsReadCdMsf,SupportsReadCdRaw,SupportsReadCdMsfRaw,SupportsReadLong16,SupportsReadLong,ModeSense6Data,ModeSense10Data,LBASectors,LBA48Sectors,LogicalAlignment,NominalRotationRate,PhysicalBlockSize,SolidStateDevice,UnformattedBPT,UnformattedBPS,SupportsReadDmaLba,SupportsReadDmaRetryLba,SupportsReadLba,SupportsReadRetryLba,SupportsReadLongLba,SupportsReadLongRetryLba,SupportsSeekLba,SupportsReadDmaLba48,SupportsReadLba48,SupportsReadDma,SupportsReadDmaRetry,SupportsReadRetry,SupportsReadSectors,SupportsReadLongRetry,SupportsSeek,CanReadingIntersessionLeadIn,CanReadingIntersessionLeadOut,IntersessionLeadInData,IntersessionLeadOutData,Read6Data,Read10Data,Read12Data,Read16Data,ReadLong10Data,ReadLong16Data,ReadSectorsData,ReadSectorsRetryData,ReadDmaData,ReadDmaRetryData,ReadLbaData,ReadRetryLbaData,ReadDmaLbaData,ReadDmaRetryLbaData,ReadLba48Data,ReadDmaLba48Data,ReadLongData,ReadLongRetryData,ReadLongLbaData,ReadLongRetryLbaData,TocData,FullTocData,AtipData,PmaData,ReadCdData,ReadCdMsfData,ReadCdFullData,ReadCdMsfFullData,Track1PregapData,LeadInData,LeadOutData,C2PointersData,PQSubchannelData,RWSubchannelData,CorrectedSubchannelData,PQSubchannelWithC2Data,RWSubchannelWithC2Data,CorrectedSubchannelWithC2Data,PfiData,DmiData,CmiData,DvdBcaData,DvdAacsData,DvdDdsData,DvdSaiData,PriData,EmbossedPfiData,AdipData,DcbData,HdCmiData,DvdLayerData,BluBcaData,BluDdsData,BluSaiData,BluDiData,BluPacData,PlextorReadCddaData,PioneerReadCddaData,PioneerReadCddaMsfData,NecReadCddaData,PlextorReadRawDVDData,HLDTSTReadRawDVDData")]
|
||||
TestedMedia testedMedia)
|
||||
{
|
||||
if(ModelState.IsValid)
|
||||
{
|
||||
_context.Add(testedMedia);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
return View(testedMedia);
|
||||
}
|
||||
|
||||
// GET: Admin/TestedMedias/Edit/5
|
||||
public async Task<IActionResult> Edit(int? id)
|
||||
{
|
||||
|
||||
@@ -37,29 +37,6 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
return View(testedSequentialMedia);
|
||||
}
|
||||
|
||||
// GET: Admin/TestedSequentialMedias/Create
|
||||
public IActionResult Create() => View();
|
||||
|
||||
// POST: Admin/TestedSequentialMedias/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,CanReadMediaSerial,Density,Manufacturer,MediaIsRecognized,MediumType,MediumTypeName,Model,ModeSense6Data,ModeSense10Data")]
|
||||
TestedSequentialMedia testedSequentialMedia)
|
||||
{
|
||||
if(ModelState.IsValid)
|
||||
{
|
||||
_context.Add(testedSequentialMedia);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
return View(testedSequentialMedia);
|
||||
}
|
||||
|
||||
// GET: Admin/TestedSequentialMedias/Edit/5
|
||||
public async Task<IActionResult> Edit(int? id)
|
||||
{
|
||||
|
||||
@@ -43,34 +43,6 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
return View(usbProduct);
|
||||
}
|
||||
|
||||
// GET: Admin/UsbProducts/Create
|
||||
public IActionResult Create()
|
||||
{
|
||||
ViewData["VendorId"] = new SelectList(_context.UsbVendors, "Id", "Id");
|
||||
|
||||
return View();
|
||||
}
|
||||
|
||||
// POST: Admin/UsbProducts/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,ProductId,Product,AddedWhen,ModifiedWhen,VendorId")]
|
||||
UsbProduct usbProduct)
|
||||
{
|
||||
if(ModelState.IsValid)
|
||||
{
|
||||
_context.Add(usbProduct);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
ViewData["VendorId"] = new SelectList(_context.UsbVendors, "Id", "Id", usbProduct.VendorId);
|
||||
|
||||
return View(usbProduct);
|
||||
}
|
||||
|
||||
// GET: Admin/UsbProducts/Edit/5
|
||||
public async Task<IActionResult> Edit(int? id)
|
||||
{
|
||||
|
||||
@@ -35,27 +35,6 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
return View(usbVendor);
|
||||
}
|
||||
|
||||
// GET: Admin/UsbVendors/Create
|
||||
public IActionResult Create() => View();
|
||||
|
||||
// POST: Admin/UsbVendors/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,VendorId,Vendor,AddedWhen,ModifiedWhen")]
|
||||
UsbVendor usbVendor)
|
||||
{
|
||||
if(ModelState.IsValid)
|
||||
{
|
||||
_context.Add(usbVendor);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
return View(usbVendor);
|
||||
}
|
||||
|
||||
// GET: Admin/UsbVendors/Edit/5
|
||||
public async Task<IActionResult> Edit(int? id)
|
||||
{
|
||||
|
||||
@@ -36,28 +36,6 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
return View(usb);
|
||||
}
|
||||
|
||||
// GET: Admin/Usbs/Create
|
||||
public IActionResult Create() => View();
|
||||
|
||||
// POST: Admin/Usbs/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,VendorID,ProductID,Manufacturer,Product,RemovableMedia,Descriptors")]
|
||||
Usb usb)
|
||||
{
|
||||
if(ModelState.IsValid)
|
||||
{
|
||||
_context.Add(usb);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
return View(usb);
|
||||
}
|
||||
|
||||
// GET: Admin/Usbs/Edit/5
|
||||
public async Task<IActionResult> Edit(int? id)
|
||||
{
|
||||
|
||||
@@ -35,26 +35,6 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
return View(version);
|
||||
}
|
||||
|
||||
// GET: Admin/Versions/Create
|
||||
public IActionResult Create() => View();
|
||||
|
||||
// POST: Admin/Versions/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,Value,Count")] Version version)
|
||||
{
|
||||
if(ModelState.IsValid)
|
||||
{
|
||||
_context.Add(version);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
return View(version);
|
||||
}
|
||||
|
||||
// GET: Admin/Versions/Edit/5
|
||||
public async Task<IActionResult> Edit(int? id)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user