diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-02-17 16:23:44 -0800 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-02-18 15:54:58 -0800 |
commit | 5796ccd83e19a18117142236b8452128308e7158 (patch) | |
tree | b7d2c51786659d95f3e26e8e99d2febfe94b255c | |
parent | f4c81aea5d306a0739279f30d6ae97504fbb05df (diff) | |
download | gitlab-ce-5796ccd83e19a18117142236b8452128308e7158.tar.gz |
Remove Group#owner_id from API since it is not used any more
-rw-r--r-- | CHANGELOG | 1 | ||||
-rw-r--r-- | doc/api/groups.md | 2 | ||||
-rw-r--r-- | lib/api/entities.rb | 2 | ||||
-rw-r--r-- | lib/api/groups.rb | 2 |
4 files changed, 3 insertions, 4 deletions
diff --git a/CHANGELOG b/CHANGELOG index 82e1c58f0a7..2721bda4f4c 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -57,6 +57,7 @@ v 7.8.0 (unreleased) - Add quick help links to the GitLab pricing and feature comparison pages. - Fix duplicate authorized applications in user profile and incorrect application client count in admin area. - Make sure Markdown previews always use the same styling as the eventual destination. + - Remove deprecated Group#owner_id from API v 7.7.2 - Update GitLab Shell to version 2.4.2 that fixes a bug when developers can push to protected branch diff --git a/doc/api/groups.md b/doc/api/groups.md index 3c1858e697d..b5a4b05ccaf 100644 --- a/doc/api/groups.md +++ b/doc/api/groups.md @@ -14,7 +14,6 @@ GET /groups "id": 1, "name": "Foobar Group", "path": "foo-bar", - "owner_id": 18, "description": "An interesting group" } ] @@ -87,7 +86,6 @@ GET /groups?search=foobar "id": 1, "name": "Foobar Group", "path": "foo-bar", - "owner_id": 18, "description": "An interesting group" } ] diff --git a/lib/api/entities.rb b/lib/api/entities.rb index 8d0664386b4..7572104fc16 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -65,7 +65,7 @@ module API end class Group < Grape::Entity - expose :id, :name, :path, :owner_id, :description + expose :id, :name, :path, :description end class GroupDetail < Group diff --git a/lib/api/groups.rb b/lib/api/groups.rb index 384a28e41f5..a92abd4b690 100644 --- a/lib/api/groups.rb +++ b/lib/api/groups.rb @@ -33,9 +33,9 @@ module API attrs = attributes_for_keys [:name, :path, :description] @group = Group.new(attrs) - @group.owner = current_user if @group.save + @group.add_owner(current_user) present @group, with: Entities::Group else render_api_error!("Failed to save group #{@group.errors.messages}", 400) |