Problem/Motivation
Not sure if we're the only ones, but we have multiple roles which overlap in the permissions.
Like "Content Editors" and "Content Reviewers" being allowed to view all unpublished content (and edit them, do the whole content-workflow-fun).
We also split the content types into their own features. Like a "FAQ"-Feature containing a "Question"-Content type and another "Guide"-Feature having "Guide-Article"-Content type.
The role "Content Editor" should be able to work with both types.
With this setup config-split 2.x behaves weird.
Config export results in the FAQ-Split having just FAQ-Permissions, which is fine, but the Guide-Split has the permission for both.
I had three Splits, and the third one had the permissions of the two and his own...
With the same weights it looks like it's going through the splits alphabetically. With weights, it does the same... but sorted by weight.
I guess some sort of... cascade is happening somewhere? Some array is not cleared? Not sure how any of this works.
(Maybe the dependencies... get confused? Because a Permission assigned to a role... expects that role to exist? I don't know.)
Steps to reproduce
- make sure you have 2 content types (article and page are fine)
- make sure you have 2 roles (content_editor and ... content_editor_2, be creative!)
- remove any permissions for the 2 roles (just to have a clear state)
- allow the two roles to create contents for both content types
- create 2 Splits. One for each of the content types. (same weights, different folders, both active and non-stackable [even though stackability doesn't seem to make a difference])
- do a config-export
- check the split configs.
Proposed resolution
I have no clue... don't even know the issue.
My expectation would be to have the permissions for a content-type only in the corresponding feature-split.
But not the way it was in 1.x, where the first split gets all the permissions for the roles. Having the module patch the configs together is a great idea.
Remaining tasks
1. Find the issue.
2. Fix the issue.
3. Be happy.
User interface changes
None.
API changes
None?
Data model changes
None?