Skip to content

Creation form can be accessed in SonataAdmin when an object already exists in database #2

@GeneraleCauchemar

Description

@GeneraleCauchemar

On the SonataAdmin dashboard, an "add new" link is still shown for singleton entities, even when one already exists in database, and the creation form is still accessible, with no redirection to the edition form (redirection is made when clicking on the "list" link, or on the admin name in the menu on the left of the dashboard).

Expected behaviour:

  • if no object exists, an "add new" is displayed and leads to the creation form
  • if an object already exists in the database, an "edit" link is displayed instead and leads to the edition form. Any attempt to access the creation form redirects to the edition one.
  • the list button shouldn't exist

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions