Replies: 1 comment 1 reply
-
@RafaelKr you can create "static roles" which you use in code via fixtures and call in the fixtures |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
We're creating a role called
Portal Customer
. We'd like to use the role keyportal_customer
for that. Especially because for Symfony the role would be calledROLE_SULU_PORTAL CUSTOMER
(note the space) without setting the key.I'd like to create a PR, but we have the following options:
Create a new configuration key in
config/packages/sulu_community.yaml
with the pathsulu_community.website.role_name
corresponding to therole
configuration option.Create the PR to https://github.com/sulu/sulu and adjust the following line to replace spaces with underscores: https://github.com/sulu/sulu/blob/15a676466de29d815d016b37dd7cb97fef1cc76d/src/Sulu/Bundle/SecurityBundle/Entity/Role.php#L130. Of course this would be a breaking change so the PR would be against the 3.0 branch.
Also the AsciiSlugger could be used which is available from Symfony 5.0, using
_
as the seperator.Doing both PRs
What is your preferred approach to that? Of course I'm open to other solutions too.
Edit:
AsciiSlugger
is available starting from Symfony 5.0, before I told it's available from 7.1 as that is what the version selector in the documentation suggested.Beta Was this translation helpful? Give feedback.
All reactions