mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-09-23 18:38:18 +00:00
Merge "Fix error message when trying to reply to transcluded comment on a protected page"
This commit is contained in:
commit
1bc53f313c
|
@ -149,12 +149,16 @@ function checkThreadItemOnPage( pageName, oldId, threadItem ) {
|
|||
'discussiontools-error-comment-is-transcluded-title',
|
||||
mwTitle.getPrefixedText()
|
||||
).parse();
|
||||
} else {
|
||||
} else if ( metadata.canEdit ) {
|
||||
// If the user can edit, advise them to use the edit button
|
||||
transcludedErrMsg = mw.message(
|
||||
'discussiontools-error-comment-is-transcluded',
|
||||
// eslint-disable-next-line no-jquery/no-global-selector
|
||||
$( '#ca-edit' ).text()
|
||||
).parse();
|
||||
} else {
|
||||
// Otherwise, tell them why they can't edit
|
||||
transcludedErrMsg = metadata.notices[ 'permissions-error' ];
|
||||
}
|
||||
|
||||
return $.Deferred().reject( 'comment-is-transcluded', { errors: [ {
|
||||
|
|
Loading…
Reference in a new issue