Module: Decidim::UserGroups

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

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