mirror of
https://github.com/go-gitea/gitea.git
synced 2026-11-02 13:44:16 +09:00
Backport https://github.com/go-gitea/gitea/pull/39960 Locking a pull request stops users without write access from commenting, but the review paths never checked the lock, so any signed-in user could still post reviews, code comments and replies on a locked pull request. The cherry-pick conflicted on the `repo-diff.ts` imports, because `release/v28` has no `DiffFileTreeLocale`. Co-authored-by: Basavaraj S m <basavaraj@digiscrypt.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
10 files changed
+86
-52
No files matched your search
@@ -11,7 +11,7 @@ import {createTippy} from '../modules/tippy.ts';
|
||||
import {invertFileFolding} from './file-fold.ts';
|
||||
import {parseDom} from '../utils.ts';
|
||||
import {registerGlobalEventFunc, registerGlobalInitFunc} from '../modules/observer.ts';
|
||||
import {performFetchActionTrigger} from '../modules/fetch-action.ts';
|
||||
import {performFetchActionRequest, performFetchActionTrigger} from '../modules/fetch-action.ts';
|
||||
import {applyFiltersToFileBoxes, diffTreeStore} from '../modules/diff-file.ts';
|
||||
import {initImageDiff} from './imagediff.ts';
|
||||
|
||||
@@ -52,7 +52,8 @@ function initRepoDiffConversationForm() {
|
||||
// on the diff page, the form is inside a "tr" and need to get the line-type ahead
|
||||
// but on the conversation page, there is no parent "tr"
|
||||
const trLineType = form.closest('tr')?.getAttribute('data-line-type');
|
||||
const response = await POST(form.getAttribute('action')!, {data: formData});
|
||||
const response = await performFetchActionRequest(form, {method: 'POST', url: form.getAttribute('action')!, data: formData});
|
||||
if (!response) return;
|
||||
const newConversationHolder = createElementFromHTML(await response.text());
|
||||
const path = newConversationHolder.getAttribute('data-path');
|
||||
const side = newConversationHolder.getAttribute('data-side');
|
||||
|
||||
Reference in new issue
Block a user