This module restores some of the legacy User Groups functionality that was deprecated and removed in Decidim 0.31 (decidim/decidim#14130).
While Decidim core has migrated User Groups into regular participants with shared credentials, some usecases still rely on the ability for participants to act on behalf of a group when participating in the platform. This module brings back selected pieces of that functionality.
Restores the comment_as selector in the comment form, allowing verified participants to choose whether they want to post a comment as themselves or on behalf of a user group they belong to.
Add this line to your application's Gemfile:
gem "decidim-group_users", git: "git@github.com:mainio/decidim-module-group_users.git"And then execute:
bundle installImportant: This module must be installed before running Decidim's database migrations. Decidim 0.32 ships migrations that permanently drop all user group tables and columns. If those migrations run first, user group data will be lost and cannot be recovered.
After copying migrations, run the neutralization task before migrating:
rails decidim:install:migrations
rails decidim_group_users:install:migrations
rails decidim_group_users:neutralize_user_group_migrations
rails db:migrateThe neutralization task rewrites the upstream removal migrations as no-ops so they are recorded as "run" without actually dropping any tables or columns.
When upgrading Decidim (e.g. from 0.31 to 0.32), follow this exact order:
- Update the Decidim version in your
Gemfile - Run
bundle update decidim - Copy new migrations:
rails decidim:install:migrations - Neutralize the removal migrations:
rails decidim_group_users:neutralize_user_group_migrations - Run migrations:
rails db:migrate
Do not skip step 4. If rails db:migrate runs before neutralization, the user group tables will be dropped and all associated data will be permanently lost.
Once installed, the comment_as dropdown will reappear in comment forms across the platform. Participants who belong to a verified user group will be able to select that group when posting a comment, and the comment will be attributed accordingly.
No further configuration is required for the basic feature to work.
This module is intended for Decidim 0.31 and above, where the original User Groups feature has been removed from core.
See Decidim's contributing guide.
This engine is distributed under the GNU Affero General Public License v3.0.