- Issue created by @arwillame
- Merge request !226Issue #3511625: Add configuration option for default group status - Add... → (Open) created by arwillame
Currently, the Group module creates new groups as published by default. This makes it difficult for sites that need to implement a moderation workflow where groups should be unpublished until reviewed.
Add a configuration option to the group type settings that allows administrators to set whether new groups of that type should be published or unpublished by default.
Technical details:
1. Add a new `default_status` property to the GroupType entity
2. Add getter/setter methods in GroupTypeInterface
3. Add a checkbox in the group type form
4. Modify the Group entity's preCreate() method to set the status based on the group type setting
5. Add the new property to the config_export section
Benefits:
- Allows sites to implement proper moderation workflows for groups
- Maintains backward compatibility (defaults to published)
- Follows Drupal's pattern of configurable default status (similar to nodes)
- No impact on existing groups or group types
Implementation approach:
1. Add the property and methods to GroupType entity
2. Add the form field in GroupTypeForm
3. Update the Group entity to respect this setting
4. Add tests to verify the behavior
Active
3.3
Code