commit | bef51721b4e2a9f7be2829321002a7ba22463628 | [log] [tgz] |
---|---|---|
author | Milutin Kristofic <milutin@google.com> | Wed Oct 12 11:29:55 2022 +0200 |
committer | Milutin Kristofic <milutin@google.com> | Wed Oct 12 15:43:57 2022 +0200 |
tree | 324e83a06cc1096b06efd80a3511920a70856ebb | |
parent | e69f205dc1f68ea3984955ff7b23a7fcf3c3e9a2 [diff] |
Do not restrict removing from CC - restriction in gr-reply-dialog is regression from lit migration Change 334555. - fixing restricting in hovercard. Configuration is only about reviewer not CC https://gerrit-review.googlesource.com/Documentation/access-control.html#category_remove_reviewer And the reason for restricting removal of reviewer is usually to restrict removing negative vote. Which is not case for CC. Google-Bug-Id: b/252930778 Release-Notes: skip Change-Id: I9944974cc2aef61e5c26ce5913044da3bd4e6863
diff --git a/polygerrit-ui/app/elements/change/gr-reply-dialog/gr-reply-dialog.ts b/polygerrit-ui/app/elements/change/gr-reply-dialog/gr-reply-dialog.ts index b540c89..96a2aba 100644 --- a/polygerrit-ui/app/elements/change/gr-reply-dialog/gr-reply-dialog.ts +++ b/polygerrit-ui/app/elements/change/gr-reply-dialog/gr-reply-dialog.ts
@@ -854,7 +854,6 @@ .reviewerState=${ReviewerState.CC} @account-added=${this.handleAccountAdded} @accounts-changed=${this.handleCcsChanged} - .removableValues=${this.change?.removable_reviewers} .filter=${this.filterCCSuggestion} .pendingConfirmation=${this.ccPendingConfirmation} @pending-confirmation-changed=${this.handleCcsConfirmationChanged}
diff --git a/polygerrit-ui/app/utils/change-util.ts b/polygerrit-ui/app/utils/change-util.ts index 07b63d6..9062ac7 100644 --- a/polygerrit-ui/app/utils/change-util.ts +++ b/polygerrit-ui/app/utils/change-util.ts
@@ -282,7 +282,9 @@ change?: ChangeInfo, reviewer?: AccountInfo ): boolean { - if (!change?.removable_reviewers || !reviewer) return false; + if (!reviewer || !change) return false; + if (isCc(change, reviewer)) return true; + if (!change.removable_reviewers) return false; return change.removable_reviewers.some( account => account._account_id === reviewer._account_id ||