Deprecate group owner in API
With groups in NoteDb, we moved the explicit owner group of a group to
be reflected using permissions. With that, there can be multiple owners
of a group and the single owner attribute is no longer applicable.
Additionally, resolving from permissions to an 'owner' capability can be
hard due to the usage of ref patterns and permission inheritance.
Change-Id: I09fc04cbdf0d6e25def21e3a23bf6e35d44e912f
diff --git a/Documentation/rest-api-groups.txt b/Documentation/rest-api-groups.txt
index 45c5e34..63d0b40 100644
--- a/Documentation/rest-api-groups.txt
+++ b/Documentation/rest-api-groups.txt
@@ -1516,8 +1516,8 @@
|`options` ||link:#group-options-info[Options of the group]
|`description` |only for internal groups|The description of the group.
|`group_id` |only for internal groups|The numeric ID of the group.
-|`owner` |only for internal groups|The name of the owner group.
-|`owner_id` |only for internal groups|The URL encoded UUID of the owner group.
+|`owner` |deprecated, only for internal groups|The name of the owner group.
+|`owner_id` |deprecated, only for internal groups|The URL encoded UUID of the owner group.
|`created_on` |only for internal groups|The
link:rest-api.html#timestamp[timestamp] of when the group was created.
|`_more_groups`|optional, only for internal groups, not set if `false`|
diff --git a/java/com/google/gerrit/extensions/common/GroupInfo.java b/java/com/google/gerrit/extensions/common/GroupInfo.java
index b21475c..a4ab4cf 100644
--- a/java/com/google/gerrit/extensions/common/GroupInfo.java
+++ b/java/com/google/gerrit/extensions/common/GroupInfo.java
@@ -24,8 +24,8 @@
// These fields are only supplied for internal groups.
public String description;
public Integer groupId;
- public String owner;
- public String ownerId;
+ @Deprecated public String owner;
+ @Deprecated public String ownerId;
public Timestamp createdOn;
public Boolean _moreGroups;