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

settings per entity #51

Open
juanolon opened this issue Feb 18, 2016 · 3 comments
Open

settings per entity #51

juanolon opened this issue Feb 18, 2016 · 3 comments
Milestone

Comments

@juanolon
Copy link

Hey,
nice bundle btw. i do have a question:
i would like to have different settings per user. On my project, we use different entities per user group. And each of them has different settings. The user entity already implements the SettingsOwnerInterface interface and getSettingIdentifier() returns different id's per user type. But all settings with scope "user" are being show to all users.

So my question is, did i miss something? or is this the current behaviour of the scope "user"? if so, does adding a new config namespace to the scope "user", and then filter the settings per entity class would be a good approach? something like this:

dmishh_settings:
    settings:
        guide:
            scope: user
            namespace: 'My\Bundle\Entity\Student'
            validation:
                type: choice
                options:
                    choices:
                        - opt1
                        - opt2
                    required: false
                    expanded: true
                    attr:
                        class:  'form-group checkbox'
                    placeholder: false
@Nyholm
Copy link
Collaborator

Nyholm commented Mar 12, 2016

Hey.
Sorry for the slow response. Have I understood you correctly that you have multiple user groups and each group got different set of settings?

@juanolon
Copy link
Author

hi,
no problem. if you mean "user groups" like, different entities pre user type, then yes :)
well, i have already done a small patch. will send you a PR

@rvanlaak
Copy link
Owner

I remember that we've discussed the grouping before a while ago in #23 so maybe also take that into account.

@Nyholm Nyholm added this to the 2.0 milestone Mar 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants