Problem/Motivation

Group role config entities (exported as group.role.*.yml) stores group permissions and other configuration. When importing and exporting this config, the permissions section seems to flip-flop between being stored as an unordered/bulleted list and a numbered list.

For example:

  - 'view group'
  - 'leave group'

vs.

  2: 'view group'
  3: 'leave group'

You can manually edit the config to be non-numbered (or numbered) and import, but saving permissions and exporting config seems to cause unpredictable results, with some roles saving as numbered, some as unordered.

Proposed resolution

Add the same sorting code from core's Role config entity so that permissions config comes out consistently as an alpha-sorted, non-numbered list.

Remaining tasks

TBD, patch incoming

User interface changes

None

API changes

n/a

Data model changes

n/a

Release notes snippet

Exporting group roles, specifically permissions in group roles, is now consistently alphabetically sorted and should no longer be exported with numbered keys.

CommentFileSizeAuthor
#2 group-3030168-2.patch493 bytesstar-szr

Comments

Cottser created an issue. See original summary.

star-szr’s picture

Status: Active » Needs review
StatusFileSize
new493 bytes

Patch to consistently export the permissions.

star-szr’s picture

Issue summary: View changes

kristiaanvandeneynde’s picture

Status: Needs review » Fixed

This is as straightforward as it gets, thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.