code: def authorization_target(original_class):
      
  
      def can(self, action, subject):
          ability = Ability(self, get_authorization_method())
          return ability.can(action, subject)
  
      def cannot(self, action, subject):
          return not can(self, action, subject)
  
      setattr(original_class, 'can', can)
      setattr(original_class, 'cannot', cannot)
  
      return original_class
docs: Add bouncer goodness to the model.  This is a class decorator, when added to your User model if will add
          ``can`` and ``cannot`` methods to the class
      :param original_class:  the User class to be decorated