Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Group Permission Set

No security coverage Under active development

Part of the Group ecosystem · 61 projects

This module allows you to define multiple permission sets for each group type. Group administrators can then select a specific permission set for their individual groups, enabling more flexible control over who can access group content.

This module adds support for defining multiple permission sets per group type. Users that have permissions to create/edit groups can then choose which permission set will provide permissions for the group.

Features

By default, the permissions for each group role are provided at the group type level. Let's say, for example, you have a social media application where users can join groups. All groups would have the same exact permissions; if you wanted to have groups with different permissions you would need to create multiple group types.

This module allows creating multiple permission sets for each group type. You can then create a set that only allows group members to see group posts, another permission set that might allow some content types to be visible to non-members while others are visible only to members, and another permission set that makes all group content public.

Group administrators can then choose the permission set that should be used by each one of their groups.

Post-Installation

Edit the group types that you want to enable permission sets on, and select the provided checkbox.

This module does not yes provide a UI for creating/updating permission templates. Until that is implemented, a developer needs to define the permission sets as configuration in the code. Here is an example.

The naming convention is to use the ID of the group type as a prefix, then something that is meaningful for your use case. But this is just a suggestion, use the naming conventions that work for your use case. Always create a default set for each group type, whether you name it as such or not.

# group_permission_set.set.my_group_type_default.yml
langcode: en
status: true
dependencies: {  }
id: my_group_type_default
label: Default
description: 'The default permission set for groups of type My Group Type. Allows access to view published page/post content items to all anonymous and authenticated users, but only allows access to view published exclusive content items to users with the Member role in the group.'
group_type_id: my_group_type
permissions:
  my_group_type-admin: {  }
  my_group_type-anonymous:
    - 'view node:page entity'
    - 'view node:post entity'
  my_group_type-authenticated:
    - 'view node:page entity'
    - 'view node:post entity'
  my_group_type-member:
    - 'view node:page entity'
    - 'view node:post entity'
    - 'view node:exclusive entity'

You can then import the configuration using drush cim and you'll get the permission set created in the system and available to all groups of type my_group_type.

Additional Requirements

Currently, this module works only with Group version 3.

Similar projects

See #3425908: How is this module different to Group Permissions and Group Permissions Template.

Ask your assistant about Group Permission Set

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
5
Tracked since
Mar 2024
Latest release
2 years ago
Releases (12 mo)
0
Maintenance
Dormant

Release Timeline

Releases

Version Type Core PHP Release date
1.0.0-alpha4 Pre-release 9–10 Oct 7, 2024
1.0.0-alpha3 Pre-release 9–10 Oct 3, 2024
1.0.0-alpha2 Pre-release 9–10 PHP ^8.0 Sep 10, 2024
1.0.0-alpha1 Pre-release 9–10 PHP ^8.0 Aug 21, 2024
1.x-dev Dev 9–10 PHP ^8.0 Mar 4, 2024