Skip to content

Force delete is possible when selecting 'all matching' records, even if underlying policy returns false for force delete #2429

Closed
@mattyh88

Description

@mattyh88
  • Laravel Version: 6.13.1
  • Nova Version: 2.12.0
  • PHP Version: 7.4.2
  • Database Driver & Version: MySQL 5.7.27
  • Operating System and Version: Debian GNU Linux
  • Browser type and version: Chrome 80.0.3987.132
  • Reproduction Repository: https://github.com/###/###

Description:

The 'force delete' option is available when selecting 'all matching records', even if the underlying policy returns false for 'forceDelete()'.

Steps To Reproduce:

Good scenario:

  1. List records of a certain resource
  2. Click the checkbox in the upper left corner of the table
  3. Choose 'select all'
  4. Click the dustbin icon
  5. 'Force delete' is not available

Faulty scenario:

  1. List records of a certain resource
  2. Click the checkbox in the upper left corner of the table
  3. Choose 'select all matching'
  4. Click the dustbin icon
  5. 'Force delete' is available

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugVerified bug by the Nova team

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions