Module: Decidim::UserGroups

Extended by:
ActiveSupport::Concern
Included in:
GroupAdminsController, GroupEmailConfirmationsController, GroupInvitesController, GroupMembersController, GroupsController, ProfilesController, UserActivitiesController, UserConversationsController, UserGroupJoinRequestsController, UserProfile, UserTimelineController
Defined in:
decidim-core/app/controllers/concerns/decidim/user_groups.rb,
decidim-core/app/queries/decidim/user_groups/accepted_users.rb,
decidim-core/app/queries/decidim/user_groups/admin_memberships.rb,
decidim-core/app/queries/decidim/user_groups/member_memberships.rb,
decidim-core/app/queries/decidim/user_groups/invited_memberships.rb,
decidim-core/app/queries/decidim/user_groups/accepted_memberships.rb,
decidim-core/app/queries/decidim/user_groups/accepted_user_groups.rb,
decidim-core/app/queries/decidim/user_groups/manageable_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.

Defined Under Namespace

Classes: AcceptedMemberships, AcceptedUserGroups, AcceptedUsers, AdminMemberships, InvitedMemberships, ManageableUserGroups, MemberMemberships

Instance Method Summary collapse

Instance Method Details

#enforce_user_groups_enabledObject

Raises:

  • (Decidim::ActionForbidden)

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

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