The frontend relies on the memberships relating municipalities and province to - automatically select the appropriate province given a municipality; and - limit the municipality options to those in a given province. This kind of functionality is used in both the worship and non-worship module so the data should be readable by users with either roles. This moves the appropriate data the `shared` graph, which can be read by all authenticated users. Thereby fixing that that functionality was broken for users with the worship role.
25 lines
881 B
SPARQL
25 lines
881 B
SPARQL
PREFIX org: <http://www.w3.org/ns/org#>
|
|
|
|
DELETE {
|
|
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
|
|
?membership ?p ?o .
|
|
?organization org:hasSubOrganization ?member .
|
|
}
|
|
} INSERT {
|
|
GRAPH <http://mu.semte.ch/graphs/shared>{
|
|
?membership ?p ?o .
|
|
?organization org:hasSubOrganization ?member .
|
|
}
|
|
} WHERE {
|
|
GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
|
|
?membership a org:Membership ;
|
|
org:member ?member ;
|
|
org:organization ?organization ;
|
|
?p ?o .
|
|
}
|
|
GRAPH <http://mu.semte.ch/graphs/shared> {
|
|
?member org:classification <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/5ab0e9b8a3b2ca7c5e000001> . # Municipality
|
|
?organization org:classification <http://data.vlaanderen.be/id/concept/BestuurseenheidClassificatieCode/5ab0e9b8a3b2ca7c5e000000> . # Province
|
|
}
|
|
}
|