-
Notifications
You must be signed in to change notification settings - Fork 642
Open
Labels
simmeringundecided but generally optimisticundecided but generally optimistic
Description
It would be nice if this method either returned the policy class checked, or if there was some way to determine this without re-implementing the policy lookup logic.
Line 76 in 56af8f3
| def authorize(user, possibly_namespaced_record, query, policy_class: nil, cache: {}) |
One way would be to split this into two methods:
- Map incoming arguments to a policy.
- Raise an exception if the policy isn't satisified.
Would you accept a PR for this?
developius
Metadata
Metadata
Assignees
Labels
simmeringundecided but generally optimisticundecided but generally optimistic