"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.checkUserCanTerminateOwnershipChange = void 0;
function checkUserCanTerminateOwnershipChange(user, videoChangeOwnership, res) {
    if (videoChangeOwnership.NextOwner.userId === user.id) {
        return true;
    }
    res.fail({
        status: 403,
        message: 'Cannot terminate an ownership change of another user'
    });
    return false;
}
exports.checkUserCanTerminateOwnershipChange = checkUserCanTerminateOwnershipChange;
//# sourceMappingURL=video-ownership.js.map