SonataAdminBundle icon indicating copy to clipboard operation
SonataAdminBundle copied to clipboard

Allow to use symfony/expression in security attributes

Open goetas opened this issue 2 years ago • 2 comments

Subject

Allow to use symfony expressions in security attributes.

As of symfony 4.4 (https://symfony.com/doc/4.4/security/expressions.html) it is possible to use expressions (not only strings) for attributes.

I am targeting this branch, because i think that is a small bc break but if you think that it needs to go into 5.x i can rebase it.

I did not add tests or documentation because I want to see if there is interest in this PR, if yes i will provide tests and documentation.

Changelog


### Changed
- Security attributes can be string or symfony expression language expressions

To do

  • [ ] Update the tests;
  • [ ] Update the documentation;
  • [ ] Add an upgrade note.

goetas avatar Jul 18 '22 19:07 goetas

that is great to hear, i will update/rebase the PR soon

goetas avatar Jul 19 '22 16:07 goetas

I plan to release 4.16 soon. If you have time to update your PR to be on it ;)

VincentLanglet avatar Jul 28 '22 15:07 VincentLanglet

im sorry if i did not manage to finalize this PR. :(

thanks for the great work with sonata!!

goetas avatar Aug 21 '22 19:08 goetas

im sorry if i did not manage to finalize this PR. :(

thanks for the great work with sonata!!

No problem.

You had Update the documentation; in your todo but I didn't find doc to update. If you want to add some, you're welcome.

VincentLanglet avatar Aug 21 '22 19:08 VincentLanglet