Parcourir la source

add error description when user accesses to the forbidden attachment

Yuki Takei il y a 5 ans
Parent
commit
900757cc12
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      src/server/routes/attachment.js

+ 1 - 1
src/server/routes/attachment.js

@@ -188,7 +188,7 @@ module.exports = function(crowi, app) {
     const user = req.user;
     const isAccessible = await isAccessibleByViewer(user, attachment);
     if (!isAccessible) {
-      return res.json(ApiResponse.error(`Forbidden to access to the attachment '${attachment.id}'`));
+      return res.json(ApiResponse.error(`Forbidden to access to the attachment '${attachment.id}'. This attachment might belong to other pages.`));
     }
 
     // add headers before evaluating 'req.fresh'