No need to check if topic action is enabled() If the user does not have the needed capability, the action is not included in the JSON. Fix stems from David Ostrovsky's comments here: https://gerrit-review.googlesource.com/#/c/67749/1/ Change-Id: Ief0e18aa3a768333785c62209735bdfa844c81b0
diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/change/Topic.java b/gerrit-gwtui/src/main/java/com/google/gerrit/client/change/Topic.java index 9f45678..58e2d6b 100644 --- a/gerrit-gwtui/src/main/java/com/google/gerrit/client/change/Topic.java +++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/change/Topic.java
@@ -68,9 +68,7 @@ } void set(ChangeInfo info, String revision) { - canEdit = info.has_actions() - && info.actions().containsKey("topic") - && info.actions().get("topic").enabled(); + canEdit = info.has_actions() && info.actions().containsKey("topic"); psId = new PatchSet.Id( info.legacy_id(),