Skip to content

TIGER-335 batch 5: migrate comment + newsletter off _isAtLeastAdmin() - #354

Merged
WebTigers merged 1 commit into
mainfrom
feat/tiger-335-batch5-comment-newsletter
Oct 21, 2026
Merged

WebTigers merged 1 commit into
mainfrom
feat/tiger-335-batch5-comment-newsletter

Conversation

@WebTigers

Copy link
Copy Markdown
Owner

The worst-defect form — the _isAtLeastAdmin() sites.

  • comment (TIGER-343): the 'is a moderator' checks (edit/delete another's, edit-window bypass, the moderate + datatable gates) now ask the moderation capability _isAllowed('moderate') instead of inheritsRole('admin'). Row-ownership ($mine) stays an explicit row check beside it.
  • newsletter (TIGER-344): the admin gates → _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

… (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
@WebTigers
WebTigers merged commit 35b817d into main Oct 21, 2026
14 checks passed
@WebTigers
WebTigers deleted the feat/tiger-335-batch5-comment-newsletter branch October 21, 2026 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant