Преглед на файлове

add error description when user accesses to the forbidden attachment

Yuki Takei преди 5 години
родител
ревизия
900757cc12
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  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'