Skip to content

Commit

Permalink
Optimized authorization query
Browse files Browse the repository at this point in the history
  • Loading branch information
namedgraph committed Nov 24, 2024
1 parent 1d084a3 commit cb8063a
Showing 1 changed file with 56 additions and 100 deletions.
156 changes: 56 additions & 100 deletions src/main/webapp/WEB-INF/web.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,106 +28,62 @@ PREFIX sioc: <http://rdfs.org/sioc/ns#>
DESCRIBE ?auth
FROM <urn:x-arq:UnionGraph>
WHERE
{ { ?auth acl:mode $Mode
{ ?auth acl:accessTo $this }
UNION
{ ?auth acl:accessTo $Container
SERVICE $endpoint
{ GRAPH $Container
{ { $Container a def:Root }
UNION
{ $Container a dh:Container }
}
FILTER NOT EXISTS { GRAPH $this
{ $this ?thisP ?thisO }
}
}
}
UNION
{ { ?auth acl:accessToClass ?Type }
UNION
{ ?auth acl:accessToClass ?Class .
?Type (rdfs:subClassOf)* ?Class
}
SERVICE $endpoint
{ { GRAPH $this
{ $this a ?Type }
}
UNION
{ GRAPH $Container
{ { $Container a def:Root }
UNION
{ $Container a dh:Container }
$Container a ?Type
}
FILTER NOT EXISTS { GRAPH $this
{ $this ?thisP ?thisO }
}
}
UNION
{ GRAPH ?g
{ $this a <http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#FileDataObject> ;
a ?Type
}
}
}
}
{ { ?auth acl:agent $agent}
UNION
{ ?auth acl:agentGroup ?Group .
?Group foaf:member $agent
}
}
}
UNION
{ ?auth acl:mode $Mode
{ ?auth acl:agentClass foaf:Agent }
UNION
{ ?auth acl:agentClass $AuthenticatedAgentClass }
{ ?auth acl:accessTo $this }
UNION
{ ?auth acl:accessTo $Container
SERVICE $endpoint
{ GRAPH $Container
{ { $Container a def:Root }
UNION
{ $Container a dh:Container }
}
FILTER NOT EXISTS { GRAPH $this
{ ?this ?thisP ?thisO }
}
}
}
UNION
{ { ?auth acl:accessToClass ?Type }
UNION
{ ?auth acl:accessToClass ?Class .
?Type (rdfs:subClassOf)* ?Class
}
SERVICE $endpoint
{ { GRAPH $this
{ $this a ?Type }
}
UNION
{ GRAPH $Container
{ { $Container a def:Root }
UNION
{ $Container a dh:Container }
$Container a ?Type
}
FILTER NOT EXISTS { GRAPH $this
{ $this ?thisP ?thisO }
}
}
UNION
{ GRAPH ?g
{ $this a <http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#FileDataObject> ;
a ?Type
}
}
}
}
}
{
{ ?auth acl:agent $agent}
UNION
{ ?auth acl:agentGroup ?Group .
?Group foaf:member $agent
}
UNION
{ ?auth acl:agentClass foaf:Agent }
UNION
{ ?auth acl:agentClass $AuthenticatedAgentClass }
?auth acl:mode $Mode .
{ ?auth acl:accessTo $this }
UNION
{ ?auth acl:accessTo $Container
SERVICE $endpoint
{ GRAPH $Container
{ { $Container a def:Root }
UNION
{ $Container a dh:Container }
}
FILTER NOT EXISTS { GRAPH $this
{ $this ?thisP ?thisO }
}
}
}
UNION
{ { ?auth acl:accessToClass ?Type }
UNION
{ ?auth acl:accessToClass ?Class .
?Type (rdfs:subClassOf)* ?Class
}
SERVICE $endpoint
{ { GRAPH $this
{ $this a ?Type }
}
UNION
{ GRAPH $Container
{ { $Container a def:Root }
UNION
{ $Container a dh:Container }
$Container a ?Type
}
FILTER NOT EXISTS { GRAPH $this
{ $this ?thisP ?thisO }
}
}
UNION
{ GRAPH ?g
{ $this a <http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#FileDataObject> ;
a ?Type
}
}
}
}
}
]]></param-value>
</context-param>
Expand Down

0 comments on commit cb8063a

Please sign in to comment.