Failed to execute template. Cause: [Access denied when checking [script] access to [xwiki:Collaboratory.UX.HbpSkin.WebHome] for user [xwiki:XWiki.Admin]]. Click on this message for details.

MembershipJson - HBP Wiki

IAM21 instance, do not create collab nor modify a team, your changes will be lost


Changes for page MembershipJson

Last modified by bougault on 2022/03/18 14:34

From version 3.39
edited by bougault
on 2022/03/18 13:00
Change comment: There is no comment for this version
To version 3.43
edited by bougault
on 2022/03/18 13:02
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -1,25 +1,2 @@
1 -{{velocity filter="indent" wiki="false"}}
2 -$response.setContentType('application/json')
3 -#set($query = $services.query.xwql("from doc.object(Collaboratory.Apps.Membership.MembershipRequest.Code.MembershipRequestClass) as requests"))
4 -#set($memberships = $query.execute())
5 -#set($map = {})
6 -#set($rows = [])
7 -#set($ok = $rows.add("toto"))
8 -##{
9 - ## "row": [
10 - ##foreach($membershipDoc of $memberships)
11 - ##set($m = $xwiki.getDocument($membershipDoc))
12 - ##{
13 - ##hello: "world"
14 - ##"title": "$m.title",
15 - ##"target": "$m.target",
16 - ##username: '$m.username',
17 - ##"status": "$m.status",
18 - ##"date": "$m.date"
19 - ##}#if( $foreach.hasNext ), #end
20 - ##end
21 -## ]
22 -##}
23 -$jsontool.serialize(${rows})
24 -{{/velocity}}
1 +{{velocity wiki="false"}}$response.setContentType('application/json')#set($mylist = ['foo','bar'])#set($mymap= {"things": $mylist})$jsontool.serialize(${mymap}){{/velocity}}
25 25