openvibers/openvibe.live Commits

Pastes on Community: Live admins and global mods act as staff (X-OV-Staff), so moderation of others' pastes keeps working

OP OpenVibers committed 22 Sept 2026 · e266060829 · 1 file, +2 −0


Changes

ddiff --git a/server/media-proxy/pastes.js b/server/media-proxy/pastes.js
iindex dd4bab95..411c54bf 100644
---- a/server/media-proxy/pastes.js
++++ b/server/media-proxy/pastes.js
@@@ -266,6 +266,8 @@ function toCommunity(subPath) {
const sid = req.user.subject_id || await pastesClient.subjectForLiveUser(req.user.id);
if (!sid) return res.status(409).json({ error: 'This account is not linked to an OpenVibe account yet. Sign in again and retry.' });
headers['X-OV-Subject'] = sid;
++ // Live staff moderate pastes as staff (Community checks our community.paste.moderate grant).
++ if (req.user.role === 'admin' || req.user.role === 'global_mod') headers['X-OV-Staff'] = '1';
}
if (req.ip) headers['X-Forwarded-For'] = req.ip;
const opts = { method: req.method, headers, redirect: 'manual', signal: AbortSignal.timeout(req.method === 'GET' ? 20000 : 120000) };