fix: Page Rules based on Tag Matches do not work for comment permissions (#5819)
This commit is contained in:
committed by
GitHub
parent
1893fd499a
commit
2cb304100c
@@ -99,7 +99,8 @@ module.exports = class Comment extends Model {
|
||||
if (page) {
|
||||
if (!WIKI.auth.checkAccess(user, ['write:comments'], {
|
||||
path: page.path,
|
||||
locale: page.localeCode
|
||||
locale: page.localeCode,
|
||||
tags: page.tags
|
||||
})) {
|
||||
throw new WIKI.Error.CommentPostForbidden()
|
||||
}
|
||||
@@ -136,7 +137,8 @@ module.exports = class Comment extends Model {
|
||||
if (page) {
|
||||
if (!WIKI.auth.checkAccess(user, ['manage:comments'], {
|
||||
path: page.path,
|
||||
locale: page.localeCode
|
||||
locale: page.localeCode,
|
||||
tags: page.tags
|
||||
})) {
|
||||
throw new WIKI.Error.CommentManageForbidden()
|
||||
}
|
||||
@@ -169,7 +171,8 @@ module.exports = class Comment extends Model {
|
||||
if (page) {
|
||||
if (!WIKI.auth.checkAccess(user, ['manage:comments'], {
|
||||
path: page.path,
|
||||
locale: page.localeCode
|
||||
locale: page.localeCode,
|
||||
tags: page.tags
|
||||
})) {
|
||||
throw new WIKI.Error.CommentManageForbidden()
|
||||
}
|
||||
|
Reference in New Issue
Block a user