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

ability.rb is fundamentally (kinda) broken #1391

Closed
@orenyk

Description

@orenyk

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions