summaryrefslogtreecommitdiffstats
path: root/gerrit-gwtui-common
diff options
context:
space:
mode:
authorEdwin Kempin <ekempin@google.com>2017-02-21 11:56:08 +0100
committerHan-Wen Nienhuys <hanwen@google.com>2017-03-23 11:21:36 +0100
commit98ddc8a658b838451097e2e1f003ac753c102b9e (patch)
tree699117f70162d248747699506887bb77ce44fd33 /gerrit-gwtui-common
parent565a1510ae66f752f7b94c65ecf9f2feac6fd5d1 (diff)
Implement Private Changes
Private changes are only visible to owner, reviewers and users with the configured permission. This lets users stage changes without advertising their change, and conduct sensitive reviews (eg. security) mong a small group. - Add Private field to change in ReviewDb - Check visibility for private changes - Add permission that allows users to see all private changes - Add Private Footer to NoteDb - Add field for private changes to index and QueryBuilder - Add REST endpoints to Mark/Unmark private change - VisibleRefsFilter filters private changes - GWT UI: Mark/Unmark change as private and show private label - GWT UI: Show 'status (Private)' in ChangeTable. - Support to control privacy of a change on push - Add tests for reviewer visibility and new permission - Add tests for query by private - Add tests for advertised references - Add user documentation in intro-user To push a private change or to turn a change private on push the 'private' option can be specified: git push host HEAD:refs/for/master%private Removing the privacy flag should not happen accidentally, but should be a very explicit action. This is why omitting the 'private' option when pushing updates to a private change doesn't remove the privacy flag on the change. To remove the privacy flag from a change on push the 'remove-private' option can be used: git push host HEAD:refs/for/master%remove-private Change-Id: Ib2b26ea19c0286cff9c05754b0875f61e5e9fceb Signed-off-by: Edwin Kempin <ekempin@google.com> Signed-off-by: Han-Wen Nienhuys <hanwen@google.com> Signed-off-by: Patrick Hiesel <hiesel@google.com> Signed-off-by: Changcheng Xiao <xchangcheng@google.com> Signed-off-by: Alice Kober-Sotzek <aliceks@google.com>
Diffstat (limited to 'gerrit-gwtui-common')
-rw-r--r--gerrit-gwtui-common/src/main/java/com/google/gerrit/client/info/ChangeInfo.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/gerrit-gwtui-common/src/main/java/com/google/gerrit/client/info/ChangeInfo.java b/gerrit-gwtui-common/src/main/java/com/google/gerrit/client/info/ChangeInfo.java
index 0de8b6835c..3cac62cd6c 100644
--- a/gerrit-gwtui-common/src/main/java/com/google/gerrit/client/info/ChangeInfo.java
+++ b/gerrit-gwtui-common/src/main/java/com/google/gerrit/client/info/ChangeInfo.java
@@ -138,6 +138,8 @@ public class ChangeInfo extends JavaScriptObject {
public final native boolean reviewed() /*-{ return this.reviewed ? true : false; }-*/;
+ public final native boolean isPrivate() /*-{ return this.is_private ? true : false; }-*/;
+
public final native NativeMap<LabelInfo> allLabels() /*-{ return this.labels; }-*/;
public final native LabelInfo label(String n) /*-{ return this.labels[n]; }-*/;