mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 11:35:55 +01:00
fix: update hasRelation condition to be true if cid is passed in in options
This commit is contained in:
@@ -79,7 +79,7 @@ Notes.assert = async (uid, input, options = { skipChecks: false }) => {
|
||||
mainPid = utils.isNumber(mainPid) ? parseInt(mainPid, 10) : mainPid;
|
||||
|
||||
// Relation & privilege check for local categories
|
||||
const hasRelation = options.skipChecks || hasTid || await assertRelation(chain[0]);
|
||||
const hasRelation = options.skipChecks || options.cid || hasTid || await assertRelation(chain[0]);
|
||||
const privilege = `topics:${tid ? 'reply' : 'create'}`;
|
||||
const allowed = await privileges.categories.can(privilege, cid, activitypub._constants.uid);
|
||||
if (!hasRelation || !allowed) {
|
||||
|
||||
Reference in New Issue
Block a user