core: fix problem count for search

pull/550/merge
undefined 11 months ago
parent 3cbe0e6de1
commit afbf3b6174
No known key found for this signature in database

@ -193,6 +193,8 @@ export class ProblemMainHandler extends Handler {
pcount = pcount - count + pdocs.length; pcount = pcount - count + pdocs.length;
} }
} }
// some problems are hidden and cannot be viewed by current user
if (pcount > pdocs.length) pcount = pdocs.length;
if (this.user.hasPriv(PRIV.PRIV_USER_PROFILE)) { if (this.user.hasPriv(PRIV.PRIV_USER_PROFILE)) {
const domainIds = Array.from(new Set(pdocs.map((i) => i.domainId))); const domainIds = Array.from(new Set(pdocs.map((i) => i.domainId)));
await Promise.all( await Promise.all(

Loading…
Cancel
Save