. . . . "Returns all the spaces a given user belongs to, together with the role names the user has in each space." . . . "Get Spaces and roles for user" . . "prefix rdfs: \nprefix dct: \nprefix np: \nprefix npa: \nprefix npx: \nprefix gen: \nprefix schema: \n\nselect ?space ?space_label (group_concat(distinct str(?role); separator=\" \") as ?roles_multi_iri) (group_concat(distinct replace(replace(?roleLabel, \"\\\\\\\\\", \"\\\\\\\\\\\\\\\\\"), \"\\\\n\", \"\\\\\\\\n\"); separator=\"\\\\n\") as ?roles_label_multi) where {\n {\n {\n graph npa:graph {\n ?spaceRole_np npx:hasNanopubType gen:SpaceMemberRole .\n ?spaceRole_np npa:hasValidSignatureForPublicKeyHash ?spaceRole_pubkey .\n filter not exists { ?spaceRole_npx npx:invalidates ?spaceRole_np ; npa:hasValidSignatureForPublicKeyHash ?spaceRole_pubkey . }\n ?spaceRole_np np:hasAssertion ?spaceRole_a .\n }\n graph ?spaceRole_a {\n ?space gen:hasRole ?role .\n }\n } union {\n bind( as ?role)\n }\n }\n graph ?role_a {\n ?role a gen:SpaceMemberRole .\n ?role rdfs:label ?roleLabel .\n ?role dct:title ?roleTitle .\n ?role schema:name ?roleName .\n }\n graph npa:graph {\n ?role_np npx:embeds ?role .\n ?role_np np:hasAssertion ?role_a .\n }\n {\n {\n graph ?role_a {\n ?role gen:hasRegularProperty ?reg .\n }\n graph ?link_a {\n ?_agent_iri ?reg ?space .\n }\n } union {\n graph ?role_a {\n ?role gen:hasInverseProperty ?inv .\n }\n graph ?link_a {\n ?space ?inv ?_agent_iri .\n }\n }\n }\n graph npa:graph {\n ?link_np np:hasAssertion ?link_a .\n ?link_np npa:hasValidSignatureForPublicKeyHash ?link_pubkey .\n filter not exists { ?link_npx npx:invalidates ?link_np ; npa:hasValidSignatureForPublicKeyHash ?link_pubkey . }\n }\n optional {\n graph npa:graph {\n ?space_np npx:introduces ?space .\n ?space_np npa:hasValidSignatureForPublicKeyHash ?space_pubkey .\n filter not exists { ?space_npx npx:invalidates ?space_np ; npa:hasValidSignatureForPublicKeyHash ?space_pubkey . }\n ?space_np rdfs:label ?space_label .\n }\n }\n}\ngroup by ?space ?space_label\norder by ?space_label" . . "2026-03-24T14:30:06Z"^^ . . . . "Get Spaces and roles for user" . . . . . "RSA" . "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCwUtewGCpT5vIfXYE1bmf/Uqu1ojqnWdYxv+ySO80ul8Gu7m8KoyPAwuvaPj0lvPtHrg000qMmkxzKhYknEjq8v7EerxZNYp5B3/3+5ZpuWOYAs78UnQVjbHSmDdmryr4D4VvvNIiUmd0yxci47dTFUj4DvfHnGd6hVe5+goqdcwIDAQAB" . "Dr144aQ+VerTDJ43R1VXt+3Ei7Vu8Cv+ZVmWJaadWemuK7y3UwCf/fj9ThH/JyUnWtqnJBMifokrnDhMFSE0xIL4yA9mW3J5OpBNv1Z2o4E9cGdcXz3cYu8dGo9sT1UEFF+N9CzOGm9MMvvDvzvwzDbjczWu4me3ge0OJHajOpI=" . . .