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


Wiki source code of MembershipJson

Version 3.39 by bougault on 2022/03/18 13:00

Hide last authors
bougault 3.38 1 {{velocity filter="indent" wiki="false"}}
bougault 3.20 2 $response.setContentType('application/json')
bougault 3.6 3 #set($query = $services.query.xwql("from doc.object(Collaboratory.Apps.Membership.MembershipRequest.Code.MembershipRequestClass) as requests"))
bougault 3.4 4 #set($memberships = $query.execute())
bougault 3.30 5 #set($map = {})
6 #set($rows = [])
bougault 3.37 7 #set($ok = $rows.add("toto"))
bougault 3.29 8 ##{
9 ## "row": [
bougault 3.22 10 ##foreach($membershipDoc of $memberships)
11 ##set($m = $xwiki.getDocument($membershipDoc))
12 ##{
13 ##hello: "world"
bougault 3.21 14 ##"title": "$m.title",
bougault 3.20 15 ##"target": "$m.target",
bougault 3.16 16 ##username: '$m.username',
bougault 3.20 17 ##"status": "$m.status",
18 ##"date": "$m.date"
bougault 3.22 19 ##}#if( $foreach.hasNext ), #end
20 ##end
bougault 3.29 21 ## ]
22 ##}
bougault 3.39 23 $jsontool.serialize(${rows})
bougault 1.1 24 {{/velocity}}
bougault 3.28 25