mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-06-22 19:32:02 +02:00
fix: pass proper uid to privilege check in AP note federation
This commit is contained in:
@@ -86,7 +86,7 @@ activitypubApi.create.post = enabledCheck(async (caller, { pid }) => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const allowed = await privileges.posts.can('topics:read', pid, activitypub._constants.uid);
|
const allowed = await privileges.posts.can('topics:read', pid, caller.uid);
|
||||||
if (!allowed) {
|
if (!allowed) {
|
||||||
winston.verbose(`[activitypub/api] Not federating creation of pid ${pid} to the fediverse due to privileges.`);
|
winston.verbose(`[activitypub/api] Not federating creation of pid ${pid} to the fediverse due to privileges.`);
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user