mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-15 10:16:12 +01:00
fix: #9484 show user history only to admins and gmods
This commit is contained in:
@@ -93,9 +93,8 @@ Flags.init = async function () {
|
||||
};
|
||||
|
||||
Flags.get = async function (flagId) {
|
||||
const [base, history, notes, reports] = await Promise.all([
|
||||
const [base, notes, reports] = await Promise.all([
|
||||
db.getObject(`flag:${flagId}`),
|
||||
Flags.getHistory(flagId),
|
||||
Flags.getNotes(flagId),
|
||||
Flags.getReports(flagId),
|
||||
]);
|
||||
@@ -109,9 +108,8 @@ Flags.get = async function (flagId) {
|
||||
datetimeISO: utils.toISOString(base.datetime),
|
||||
target_readable: `${base.type.charAt(0).toUpperCase() + base.type.slice(1)} ${base.targetId}`,
|
||||
target: await Flags.getTarget(base.type, base.targetId, 0),
|
||||
history: history,
|
||||
notes: notes,
|
||||
reports: reports,
|
||||
notes,
|
||||
reports,
|
||||
};
|
||||
|
||||
const data = await plugins.hooks.fire('filter:flags.get', {
|
||||
|
||||
Reference in New Issue
Block a user