code: def can(self, *args, **kwargs):
          '''Overwrite this method to implement custom contextual permissions'''
          if isinstance(self.require, auth.Permission):
              return self.require.can()
          elif callable(self.require):
              return self.require()
          elif isinstance(self.require, bool):
              return self.require
          else:
              return Truf can(self, *args, **kwargs):
          '''Overwrite this method to implement custom contextual permissions'''
          if isinstance(self.require, auth.Permission):
              return self.require.can()
          elif callable(self.require):
              return self.require()
          elif isinstance(self.require, bool):
              return self.require
          else:
              return True
docs: Overwrite this method to implement custom contextual permissions