Skip to content
This repository has been archived by the owner on Jul 24, 2020. It is now read-only.

ability.rb is fundamentally (kinda) broken #1391

Closed
orenyk opened this issue Dec 23, 2015 · 0 comments
Closed

ability.rb is fundamentally (kinda) broken #1391

orenyk opened this issue Dec 23, 2015 · 0 comments

Comments

@orenyk
Copy link
Contributor

orenyk commented Dec 23, 2015

So, while reviewing #1350 we ran into an issue where we needed seemingly duplicate statements in ability.rb to handle checkout person authorization despite the fact that it appeared as it should be definable in just one when block. Unfortunately, due to the way Ruby case statements work, we're never actually getting into that when block for checkout persons. Fortunately, all of the abilities in that block are subsets of abilities in the matching checkout person block, so we haven't ever noticed this fact.

We should refactor ability.rb to properly handle role inheritance (this seems like a good setup) so that everything is cleaner and makes more sense.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants