Bug #3256
closed
Usergroup members missing when showing a usergroup
Added by Jan Orel about 11 years ago.
Updated over 6 years ago.
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)
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
Please send it as a PR.. Thanks!
- Status changed from New to Ready For Testing
- Target version set to 1.15.0
- Translation missing: en.field_release set to 1
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Also available in: Atom
PDF