Deprecate ruby 2#7
Open
wkirby wants to merge 12 commits into
Open
Conversation
… :manage expansion
BREAKING CHANGE: :manage no longer expands to [:create, :read, :update, :destroy].
Use explicit action lists instead.
- Add scope: (aliases query:), if: (aliases predicate:), through: (aliases granted_by:)
- Raise ArgumentError when both old and new keyword names are passed
- Add collection: flag to grant; when true, auto-predicate is proc { true }
- Remove :manage -> CRUD expansion from Role#add_permission
- Rewrite README with collection/instance docs, fallthrough docs, upgrade guide
- Add specs for keyword aliases and collection permissions
… support via Callable - Add PapersPlease::Delegation struct to replace raw [Class, Proc] tuples - Add PapersPlease::Callable module for arity-safe proc/lambda invocation - Permission now stores a Delegation instead of separate granted_by/granting_class - All proc call sites go through Callable.call for lambda compat - Lambdas with fewer params than the call site provides are handled gracefully
…call signatures - Remove PapersPlease::Callable; lambdas work naturally with correct arity - Delegation uses Data.define instead of Struct (immutable) - Permission: attrs are readers not accessors, add matches_subject? - Permission#granted?(user, subject) and #fetch(user, klass) have fixed signatures instead of variadic *args — no more silent action arg that nobody consumed - Policy: fix can? mutating subject across role iterations via reassignment - Policy: fix nil predicate return being treated as truthy with fallthrough - Policy: remove unused @cache, make roles attr_reader - Policy: resolve_delegation returns early on nil permission (delegated permission to nonexistent parent no longer falls through incorrectly)
egreer
requested changes
May 29, 2026
| on: | ||
| push: | ||
| branches: [main] | ||
| branches: [master] |
Contributor
There was a problem hiding this comment.
Suggested change
| branches: [master] | |
| branches: [main] |
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.
No description provided.