Repository navigation
TIGER-335/357/358: remove the role comparers + scope guest grants + add guards - #355
Merged
Merged
Conversation
…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
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 TIGER-335 finale — the deprecation window closes.
Removed (TIGER-358)
Tiger_Service_Service::_isAdmin()/_isAtLeastAdmin()andTiger_Message::isAtLeastAdmin()(+ the deadTiger_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
guestservice 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 handsguesta 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):/apiservice compares a role string (_isAdmin/_isAtLeastAdmin/inheritsRole/=== 'admin'…).acl.inigrantsguesta blanket service resource.Full suite green: 1131 unit + 1481 integration.
🤖 Generated with Claude Code
https://claude.ai/code/session_01ASauLLscjqdsNqBNsx2Typ