Module: Decidim::Admin::UserGroups

Extended by:
ActiveSupport::Concern
Included in:
UserGroupsController, UserGroupsCsvVerificationsController
Defined in:
app/controllers/concerns/decidim/admin/user_groups.rb,
app/controllers/concerns/decidim/admin/user_groups/filterable.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.

Defined Under Namespace

Modules: Filterable

Instance Method Summary collapse

Instance Method Details

#enforce_user_groups_enabledObject

Raises:

  • (Decidim::ActionForbidden)


19
20
21
# File '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