Repository navigation
TIGER-335 batch 5: migrate comment + newsletter off _isAtLeastAdmin() - #354
Merged
Merged
Conversation
… (v1.36.0)
The worst-defect form. Comment's "is a moderator" checks (edit/delete another's, edit-window bypass,
moderate + datatable gates) now ask the moderation capability _isAllowed('moderate') — same role set
as the old inheritsRole('admin') since moderate is admin-granted (superadmin/developer inherit it),
so behavior-preserving. Newsletter's admin gates → _isAllowed('<method>'). Fixed the acl.ini comments
that cited the removed helper. Tests green: 87 (incl. the mutation-tested policy tests).
Closes TIGER-343, TIGER-344.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ASauLLscjqdsNqBNsx2Typ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The worst-defect form — the
_isAtLeastAdmin()sites._isAllowed('moderate')instead ofinheritsRole('admin'). Row-ownership ($mine) stays an explicit row check beside it._isAllowed('<method>').Behavior-preserving —
moderate/datatable/the Audience admin grants resolve to the same admin-and-inheriting-roles set the old helper matched (a manager is still excluded, superadmin/developer still included). Also fixed the acl.ini comments that cited the removed helper. Tests green: 87 (incl. the mutation-tested policy tests). After this, no non-test code calls_isAtLeastAdmin().🤖 Generated with Claude Code
https://claude.ai/code/session_01ASauLLscjqdsNqBNsx2Typ