code: def permission_required(action):
      
      def decorator(f):
          @wraps(f)
          def inner(community, *args, **kwargs):
              permission = current_permission_factory(community, action=action)
              if not permission.can():
                  abort(403)
              return f(community, *args, **kwargs)
          return inner
      return decorator
docs: Decorator to require permission.