Module: Decidim::Admin::UserGroups

Extended by:
ActiveSupport::Concern
Included in:
UserGroupsController, UserGroupsCsvVerificationsController
Defined in:
decidim-admin/app/controllers/concerns/decidim/admin/user_groups.rb

Overview

The UserGroups concern must be included in all controllers related to UserGroups feature. It adds a method to enforce that the feature is enabled.

Instance Method Summary collapse

Instance Method Details

#enforce_user_groups_enabledObject

Raises:

  • (Decidim::ActionForbidden)

19
20
21
# File 'decidim-admin/app/controllers/concerns/decidim/admin/user_groups.rb', line 19

def enforce_user_groups_enabled
  raise Decidim::ActionForbidden unless current_organization.user_groups_enabled?
end