0
votes

Sorry for my english...

In my project I use ACL with SonataAdminBundle, but I can not understand why they did so, you need to have to create a record in the database, even when I want to use only Class-scope without Object-scope.

Also, when you create, for example, comments, SonataAdminBundle automatically creates an entry in acl_object_identities, it clutters up this action database.

I created a role that has the right to full access to all records in a table, regardless of who created the records, but SonataAdminBundle only displays them and prohibits editing. The documentation for SonataAdminBundle reads:

because the object ACL permission is checked, the ACL for the object must have been created, otherwise the AclVoter will deny EDIT access for a non super admin user trying to edit another non super admin user. This is automatically done when the object is created using the Admin. If objects are also created outside the Admin, have a look at the createSecurityObject method in the AclSecurityHandler.

But why? How to avoid this?

Do not want to write hooks.

Thank you in advance for any comments and help on this.

1
currently replaced service "security.acl.voter.class", disabled JMSSecurityExtraBundle() and written the hook if (null !== $this->logger) { $this->logger->debug('No ACL found for the object identity. Voting to deny access.'); } // return self::ACCESS_DENIED; // hook fixme return self::ACCESS_GRANTED;Egor Pinkevich

1 Answers

0
votes

You can generate the object ACLs with php app/console sonata:admin:generate-object-acl