Access details about abilities programmatically, for generating documentation? #859
Unanswered
denis-haskin-elemental
asked this question in
Q&A
Replies: 1 comment
-
Okay, I tweaked |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We'd like to generate some human-readable documentation on the permissions that are captured in our ability definitions.
At the high level this seems pretty straightforward, looks like we can do
.permissions
gives us a big hash that we could mung into a spreadsheet of can+cannot, e.g.Is there a way to get to the conditions defined, though?
For example, if we have an ability something like
(basically, ability to lock/unlock a User with one of those roles, within the same customer)
Is there any way from the
Ability.new
object to get to the condition expressed in thecan
statement?Beta Was this translation helpful? Give feedback.
All reactions