Foreman should provide a helper method to allow an instance of a model to ask if the instance is authorized for a given permission.
|Assigned To:||Eric Helms|
|Target version:||Sprint 23|
|Found in release:||Pull request:||https://github.com/Katello/katello/pull/5430|
|Velocity based estimate||-|
Fixes #5221: Adds a helper method to allow a model instance to inquire if the instance is authorized for a particular permission.
Model instances can be asked directly if they are authorized for a particular
permission by, for example, calling 'instance.authorized?(:view_model)'. This
abstracts and centralizes some of the repetitiveness of having to instantiate
an authorizer and pass the instance to the 'can?' method as the object of inquiry.