Project

General

Profile

« Previous | Next » 

Revision cf2e77a5

Added by Eric Helms almost 10 years ago

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.

  • added
  • modified
  • copied
  • renamed
  • deleted