Easyadminbundle: Entity actions not overriding global actions

Created on 12 Jul 2017  路  4Comments  路  Source: EasyCorp/EasyAdminBundle

If this is a BUG REPORT:

  • Describe what you wanted to do and the wrong result you got.
  • Include EasyAdmin version (it's displayed in the Symfony Debug Toolbar)
  • (Optional) If they are useful, include logs, code samples, screenshots, etc.
    I'm using version: 1.16.10, I have the delete action removed globally but when I add it in at the entity level it doesn't show. I've followed the docs here: https://symfony.com/doc/current/bundles/EasyAdminBundle/book/actions-configuration.html#removing-actions-per-entity
easy_admin:
    list:
        actions: ['-delete']
    entities:
        Bucket:
            list:
                actions: ['-edit']
            # ...
        User:
            list:
                actions: ['delete']
            # ...

The list page for Bucket doesn't have either edit or delete (which is what you would expect), but the User list page has edit and not delete but delete should be there right?

bug confirmed hasPR

Most helpful comment

Thanks for reporting this bug! I'm trying to fix it in #1826. It'd be great if you could verify that the proposed solution works for you. Thanks!

All 4 comments

I have the same problem, here is my config :
php 7.1.7
symfony v3.3.4
easyadmin-bundle v1.16.10

easy_admin:
    list:
        actions: ['show', 'search', '-new', '-edit', '-delete']
    entities:
        Category:
            list:
                actions: ['new']

As per the doc, New Category should be displayed on Category list, but it's not.

Thanks for reporting this bug! I'm trying to fix it in #1826. It'd be great if you could verify that the proposed solution works for you. Thanks!

It does fix my issue. Thanks !

@Cethy thanks for testing it. It's now merged and it will be available in the next stable version.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nickicool picture nickicool  路  4Comments

ziobudda picture ziobudda  路  4Comments

bocharsky-bw picture bocharsky-bw  路  3Comments

Farshadi73 picture Farshadi73  路  4Comments

joazvsoares picture joazvsoares  路  4Comments