Skip to content

TIGER-335/357/358: remove the role comparers + scope guest grants + add guards - #355

Merged
WebTigers merged 3 commits into
mainfrom
feat/tiger-335-finale-remove-comparers
Oct 21, 2026
Merged

WebTigers merged 3 commits into
mainfrom
feat/tiger-335-finale-remove-comparers

Conversation

@WebTigers

Copy link
Copy Markdown
Owner

The TIGER-335 finale — the deprecation window closes.

Removed (TIGER-358)

Tiger_Service_Service::_isAdmin() / _isAtLeastAdmin() and Tiger_Message::isAtLeastAdmin() (+ the dead Tiger_Message::ADMIN_ROLE) are deleted. Every one of the ~160 call sites across 21 modules was migrated to _isAllowed($privilege) / _roleIsAllowed($role, $privilege) in v1.32.0–v1.36.0; no code calls a role comparer any more. Docs (AGENTS.md, WEBSERVICES.md, signup/AGENTS.md) updated to the primitive.

Scoped (TIGER-357)

The remaining blanket guest service grants are now privilege-scoped to their actual public methods: Signup_Service_Signup (create/verifyEmail), Tiger_Service_Validate (field), Tiger_Service_Location (suggest/reverse/ip), Search_Service_Search (query). No service hands guest a resource-level allow.

Guards (the "F5 can't silently return" rails)

tests/Unit/Acl/AuthorizationGuardTest, mutation-tested (the detector is proven to catch the exact defect it forbids, and token-based so a role name in a comment doesn't false-positive):

  1. No /api service compares a role string (_isAdmin/_isAtLeastAdmin/inheritsRole/=== 'admin' …).
  2. No acl.ini grants guest a blanket service resource.

Full suite green: 1131 unit + 1481 integration.

🤖 Generated with Claude Code

https://claude.ai/code/session_01ASauLLscjqdsNqBNsx2Typ

WebTigers and others added 3 commits October 21, 2026 10:27
…dd guards (v1.37.0)

The deprecation window closes. With every call site migrated in v1.32.0–v1.36.0, this deletes the
three role comparers — Tiger_Service_Service::_isAdmin()/_isAtLeastAdmin() and
Tiger_Message::isAtLeastAdmin() (+ the dead ADMIN_ROLE const) — so authorization is decided only via
Zend_Acl::isAllowed(). Stale comments/docs (AGENTS.md, WEBSERVICES.md, signup/AGENTS.md) updated to the
_isAllowed() primitive.

TIGER-357: scoped the remaining blanket guest SERVICE grants to their public methods —
Signup_Service_Signup (create/verifyEmail), Tiger_Service_Validate (field), Tiger_Service_Location
(suggest/reverse/ip), Search_Service_Search (query). No service grants guest a resource-level allow.

Guards (tests/Unit/Acl/AuthorizationGuardTest, mutation-tested): the build fails if a role-string
comparison reappears in an /api service, or if any acl.ini grants guest a blanket service resource.

Full suite green: 1131 unit + 1481 integration.

Closes TIGER-357, TIGER-358.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ASauLLscjqdsNqBNsx2Typ
@WebTigers
WebTigers merged commit c777527 into main Oct 21, 2026
14 checks passed
@WebTigers
WebTigers deleted the feat/tiger-335-finale-remove-comparers branch October 21, 2026 14:46
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