Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exclude ROLE_DEFAULT from RoleMatrixType #1540

Merged
merged 8 commits into from
Jul 12, 2022

Conversation

Hanmac
Copy link
Contributor

@Hanmac Hanmac commented May 31, 2022

Subject

I am targeting this branch, because it should be BC.

Per default only UserInterface::ROLE_DEFAULT aka ROLE_USER is excluded, but users can still use it.

If this Component would be moved outside of UserBundle that might be changed.

Closes #1535.

Changelog

### Added
- Added `RoleMatrixType:exclude` Option to hide choices.

@Hanmac
Copy link
Contributor Author

Hanmac commented Jun 20, 2022

@jordisala1991 is this good for a fix or should i extend the test cases more for the excluded option?

or if for example i set the excluded option to only [Role_A] should UserInterface::ROLE_DEFAULT still be excluded or not?

jordisala1991
jordisala1991 previously approved these changes Jun 25, 2022
@Hanmac
Copy link
Contributor Author

Hanmac commented Jun 28, 2022

  • added docs to the rst ones
  • used better excluded_roles option name
  • added more test cases

is that clear or should i add more config option? like defining it an Configuration option?

@jordisala1991
Copy link
Member

For each option you add to an option resolver is a good practice to provide its allowed types, in this case it should be 'string[]'. Can you add that option?

VincentLanglet
VincentLanglet previously approved these changes Jun 28, 2022
@Hanmac
Copy link
Contributor Author

Hanmac commented Jun 28, 2022

Your Opinion if that option should be configuable over the Config yml too?

@VincentLanglet
Copy link
Member

Your Opinion if that option should be configuable over the Config yml too?

I don't think this is needed so far. Less config option is better if not needed.

@VincentLanglet
Copy link
Member

Is it ok for you @jordisala1991 ?

@VincentLanglet VincentLanglet requested a review from a team July 12, 2022 16:16
@VincentLanglet VincentLanglet merged commit 400b22c into sonata-project:5.x Jul 12, 2022
@Hanmac Hanmac deleted the excludeRoleDefault branch August 15, 2022 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ROLE_USER in RoleMatrixType visible without effect
3 participants