Skip to content

Fix 8534 admin requestable groups - #9912

Open
boredskull wants to merge 2 commits into
SimpleMachines:release-3.0from
boredskull:fix-8534-admin-requestable-groups
Open

boredskull wants to merge 2 commits into
SimpleMachines:release-3.0from
boredskull:fix-8534-admin-requestable-groups

Conversation

@boredskull

Copy link
Copy Markdown

Description

Fixes #8534

Administrators currently have to submit a membership request when attempting to join a requestable membergroup through Profile → Group Membership, despite already having permission to manage membergroups.

This PR allows administrators and users with the manage_membergroups permission to join requestable groups immediately, bringing the profile interface into line with existing administrative permissions.

Changes

  • Fixed: Administrators being required to request membership of requestable groups.
  • Updated: Display Join Group instead of Request Group for users with manage_membergroups.
  • Improved: Authorised users can join requestable groups without submitting a reason or awaiting approval.
  • Security: Server-side permission checks prevent ordinary members from bypassing the approval process.
  • Preserved: Existing membership requests and approval procedures for regular members.
  • Preserved: Restrictions on private and protected membergroups.
  • Preserved: Existing session validation and security checks.

Expected Behaviour

User Type Requestable Group Behaviour
Administrator Join immediately
User with manage_membergroups Join immediately
Regular member Submit membership request
Regular member with pending request Await approval

Files Changed

  • Sources/Actions/Profile/GroupMembership.php
  • Themes/default/Profile.template.php

Testing

The affected code paths have been reviewed. Live regression testing is still required.

Test Cases

  • Administrator can join a requestable group immediately.
  • Administrator is not presented with a membership request form.
  • Regular members must continue requesting membership.
  • Regular members cannot bypass approval using modified requests.
  • Existing pending membership requests remain correctly handled.
  • Free-to-join group functionality remains unchanged.
  • Private and protected membergroups remain restricted.
  • Existing session and security checks continue functioning correctly.

Additional Information

  • Target version: SMF 3.0
  • Database changes: None
  • New permissions: None
  • Compatibility: Uses the existing manage_membergroups permission.

This is a focused correction to the group membership workflow and does not introduce new functionality outside the existing administrative permission system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[3.0]: Admin still has to request to join requestable group

1 participant