Skip to content

Let only global admins manage Admin on the aggregated front-page weblog - #383

Merged
snoopdave merged 2 commits into
masterfrom
front-page-admins-global-only
Nov 24, 2026
Merged

snoopdave merged 2 commits into
masterfrom
front-page-admins-global-only

Conversation

@snoopdave

Copy link
Copy Markdown
Contributor

Master twin of #381: with aggregation on, the front-page weblog's templates read the whole site, but any Admin of that weblog could promote members or invite new Admins.

  • Granting, removing or inviting Admin on that weblog now needs a global admin. Master's Members page keys rows by user id, so the check does too.
  • New FrontPageAdminMembershipTest. Full suite on JDK 25 (release 21): 911 tests, 0 failures.
  • CHANGES.md entry under 7.0.0 behaviour changes. Note: master's Members.save fails on a permission whose user was deleted (6.1.x handles it); not changed here.

With aggregation on, the front-page weblog's templates read across the
whole site, so its Admins are trusted like global admins. A weblog Admin
could still promote members or invite new Admins there. Granting, removing
or inviting Admin on that weblog now needs a global admin.

@mraible mraible left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. The check covers promoting, removing and inviting, and the members and invite pages are the only places that grant weblog permissions.

@mraible

mraible commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

@snoopdave a heads-up for whichever of this and #322 merges second. #322 keys the Members page rows by permission id ("perm-" + perms.getId()), like 6.1.x does, while this PR's check reads "perm-" + perms.getUser().getId(). With both merged, the check finds no values, so it never applies.

I merged both onto master to check: 5 of the 6 FrontPageAdminMembershipTest tests fail with memberPermissions.oneAdminRequired. Switching the check and the test to the permission id, as #381 does on 6.1.x, should fix it.

@snoopdave
snoopdave enabled auto-merge (squash) November 24, 2026 22:25
@snoopdave

Copy link
Copy Markdown
Contributor Author

@mraible need a re-review on this one too please.

@mraible mraible left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-reviewed: the new commit is only the merge of master, and CI is green. Keying by user id is right for master as it is now. If this merges first, I'll switch the check and its test to the permission id in #322 when I bring that branch up to date.

@snoopdave
snoopdave merged commit 58ec897 into master Nov 24, 2026
9 checks passed
@snoopdave
snoopdave deleted the front-page-admins-global-only branch November 24, 2026 22:34
mraible added a commit that referenced this pull request Nov 24, 2026
…mbers page

This branch keys Members page rows by permission id, and #383's check read them by user id, so on the aggregated front page the check found no values and never applied. The check and FrontPageAdminMembershipTest now use the permission id, as #381 does on 6.1.x.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants