def METHOD_NAME(f):
    """Decorator to check if current user is an owner of the record."""
    @wraps(f)
    def inner(self, record, user, *args, **kwargs):
        if not current_user.is_authenticated:
            abort(401)
        if not current_user.id in record['_deposit']['owners']:
            current_app.logger.warning(
                "OWN-API: User is not allowed to change ownership. skipping..", exc_info=True)
            current_app.logger.warning("OWN-API: Owners are: {}".format("\n            ".join([str(User.query.filter(
                User.id.in_([i])).all()[0].email) for i in record['_deposit']['owners']])), exc_info=True)
            abort(403)
        return f(self, record, user, *args, **kwargs)
    return inner