Skip to content

Understanding scopes #57

@Nyholm

Description

@Nyholm

I want to discuss planned features of this bundle. The PR (#54) from @juanolon got me thinking of this.

Currently we have 3 scopes. GLOBAL and USER where the latter requires you to provide an entity. We do also have ALL which is some kind of default for the USER scope. (One can discuss if the names are proper #23).

PR #54 introduce a granularity of the USER scope. I understand the need and I agree with it. He wants to make sure class A does not access settings of class B. (Both are naturally in the USER scope). This is a fix for #3.


I can see some possible solution for this. I don't know which one is better. .

Option 1) Making scopes dynamic. Lets use GLOBAL, ALL and DYNAMIC and then extend the SettingsOwnerInterface with a getScope function.

Option 2) Something more like #54 where we define a namespace and make sure the entity in the USER scope is an instance of that namespace.

Option 3) In the configuration specify what entities that are allowed to what sections of the configuration.

Option 4) ??? There must be something else

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions