Browse Source

fix: move page with wrong object key (#1757)

GaliTW 5 năm trước cách đây
mục cha
commit
ac11cd2cdd
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      server/models/pages.js

+ 2 - 2
server/models/pages.js

@@ -400,8 +400,8 @@ module.exports = class Page extends Model {
 
     // -> Check for source page access
     if (!WIKI.auth.checkAccess(opts.user, ['manage:pages'], {
-      locale: page.sourceLocale,
-      path: page.sourcePath
+      locale: page.localeCode,
+      path: page.path
     })) {
       throw new WIKI.Error.PageMoveForbidden()
     }