Project

General

Profile

Actions

Bug #3256

closed

Usergroup members missing when showing a usergroup

Added by Jan Orel about 11 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
API
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

GET api/usergroups/2 gives:

'{ "usergroup": { "updated_at": "2013-10-15T12:24:10Z",
"created_at": "2013-10-11T14:34:19Z",
"name": "abc",
"id": 2}}'

I am missing member ids there.

Also documentation is missing while updating usergroup user (adding a "user_ids" attribute to the hash when you update the group)

Actions #1

Updated by Jan Orel about 11 years ago

My naive patch:

diff --git a/app/views/api/v1/usergroups/show.json.rabl b/app/views/api/v1/usergroups/show.json.rabl
index 770384f..176ccc2 100644
--- a/app/views/api/v1/usergroups/show.json.rabl
+++ b/app/views/api/v1/usergroups/show.json.rabl
@@ -1,3 +1,7 @@
 object @usergroup

-attributes :name, :id, :created_at, :updated_at
\ No newline at end of file
+attributes :name, :id, :created_at, :updated_at
+
+child :usergroup_members do
+  attributes :member_id, :value
+end

Actions #2

Updated by Ohad Levy about 11 years ago

Please send it as a PR.. Thanks!

Actions #4

Updated by Dominic Cleal about 11 years ago

  • Status changed from New to Ready For Testing
  • Target version set to 1.15.0
  • Translation missing: en.field_release set to 1
Actions #5

Updated by Anonymous about 11 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF