forked from vivo-project/Vitro
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Template to hide some properties not related to self editor profile
- Loading branch information
Showing
1 changed file
with
156 additions
and
0 deletions.
There are no files selected for viewing
156 changes: 156 additions & 0 deletions
156
home/src/main/resources/rdf/accessControl/firsttime/template_hide_not_related_property.n3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,156 @@ | ||
# $This file is distributed under the terms of the license in LICENSE$ | ||
|
||
@prefix access-individual: <https://vivoweb.org/ontology/vitro-application/auth/individual/> . | ||
@prefix access: <https://vivoweb.org/ontology/vitro-application/auth/vocabulary/> . | ||
@prefix : <https://vivoweb.org/ontology/vitro-application/auth/individual/hide-not-related-property/> . | ||
|
||
:PolicyTemplate a access:PolicyTemplate ; | ||
access:priority 5000 ; | ||
access:hasRule :HidePropertyStatementWithBlacklistedProperty ; | ||
access:hasDataSet :SelfEditorHideNotRelatedObjectPropertyDataSet ; | ||
access:hasDataSet :SelfEditorHideNotRelatedDataPropertyDataSet ; | ||
access:hasDataSet :SelfEditorHideNotRelatedFauxObjectPropertyDataSet ; | ||
access:hasDataSet :SelfEditorHideNotRelatedFauxDataPropertyDataSet ; | ||
. | ||
|
||
### Hide not related object property data sets | ||
|
||
#Object properties | ||
|
||
:SelfEditorHideNotRelatedObjectPropertyDataSet a access:DataSet ; | ||
access:hasDataSetKey :SelfEditorHideNotRelatedObjectPropertyDataSetKey ; | ||
access:hasRelatedValueSet access-individual:SelfEditorRoleValueSet ; | ||
access:hasRelatedValueSet access-individual:ObjectPropertyStatementValueSet ; | ||
access:hasRelatedValueSet access-individual:DisplayOperationValueSet ; | ||
access:hasRelatedValueSet :SelfEditorHideNotRelatedObjectPropertyValueSet ; | ||
. | ||
|
||
:SelfEditorHideNotRelatedObjectPropertyDataSetKey a access:DataSetKey ; | ||
access:hasKeyComponent access-individual:ObjectProperty ; | ||
access:hasKeyComponent access-individual:SelfEditorRoleUri ; | ||
access:hasKeyComponent access-individual:DisplayOperation ; | ||
. | ||
|
||
#Data properties | ||
|
||
:SelfEditorHideNotRelatedDataPropertyDataSet a access:DataSet ; | ||
access:hasDataSetKey :SelfEditorHideNotRelatedDataPropertyDataSetKey ; | ||
access:hasRelatedValueSet access-individual:SelfEditorRoleValueSet ; | ||
access:hasRelatedValueSet access-individual:DataPropertyStatementValueSet ; | ||
access:hasRelatedValueSet access-individual:DisplayOperationValueSet ; | ||
access:hasRelatedValueSet :SelfEditorHideNotRelatedDataPropertyValueSet ; | ||
. | ||
|
||
:SelfEditorHideNotRelatedDataPropertyDataSetKey a access:DataSetKey ; | ||
access:hasKeyComponent access-individual:DataProperty ; | ||
access:hasKeyComponent access-individual:SelfEditorRoleUri ; | ||
access:hasKeyComponent access-individual:DisplayOperation ; | ||
. | ||
|
||
#Faux object properties | ||
|
||
:SelfEditorHideNotRelatedFauxObjectPropertyDataSet a access:DataSet ; | ||
access:hasDataSetKey :SelfEditorHideNotRelatedFauxObjectPropertyDataSetKey ; | ||
access:hasRelatedValueSet access-individual:SelfEditorRoleValueSet ; | ||
access:hasRelatedValueSet access-individual:FauxObjectPropertyStatementValueSet ; | ||
access:hasRelatedValueSet access-individual:DisplayOperationValueSet ; | ||
access:hasRelatedValueSet :SelfEditorHideNotRelatedFauxObjectPropertyValueSet ; | ||
. | ||
|
||
:SelfEditorHideNotRelatedFauxObjectPropertyDataSetKey a access:DataSetKey ; | ||
access:hasKeyComponent access-individual:FauxObjectProperty ; | ||
access:hasKeyComponent access-individual:SelfEditorRoleUri ; | ||
access:hasKeyComponent access-individual:DisplayOperation ; | ||
. | ||
|
||
#Faux data properties | ||
|
||
:SelfEditorHideNotRelatedFauxDataPropertyDataSet a access:DataSet ; | ||
access:hasDataSetKey :SelfEditorHideNotRelatedFauxDataPropertyDataSetKey ; | ||
access:hasRelatedValueSet access-individual:SelfEditorRoleValueSet ; | ||
access:hasRelatedValueSet access-individual:FauxDataPropertyStatementValueSet ; | ||
access:hasRelatedValueSet access-individual:DisplayOperationValueSet ; | ||
access:hasRelatedValueSet :SelfEditorHideNotRelatedFauxDataPropertyValueSet ; | ||
. | ||
|
||
:SelfEditorHideNotRelatedFauxDataPropertyDataSetKey a access:DataSetKey ; | ||
access:hasKeyComponent access-individual:FauxDataProperty ; | ||
access:hasKeyComponent access-individual:SelfEditorRoleUri ; | ||
access:hasKeyComponent access-individual:DisplayOperation ; | ||
. | ||
|
||
#Rule | ||
|
||
:HidePropertyStatementWithBlacklistedProperty a access:Rule; | ||
access:hasDecision access-individual:Deny ; | ||
access:requiresCheck :SubjectRoleCheck ; | ||
access:requiresCheck :OperationCheck ; | ||
access:requiresCheck :AccessObjectStatementTypeCheck ; | ||
access:requiresCheck :StatementPredicateCheck ; | ||
access:requiresCheck :RelationCheck ; | ||
. | ||
|
||
#Checks | ||
|
||
:RelationCheck a access:Check ; | ||
access:useOperator access-individual:SparqlSelectQueryResultsNotContain ; | ||
access:hasTypeToCheck access-individual:StatementSubjectUri ; | ||
access:value access-individual:PersonProfileProximityToResourceUri ; | ||
. | ||
|
||
:AccessObjectStatementTypeCheck a access:Check ; | ||
access:useOperator access-individual:Equals ; | ||
access:hasTypeToCheck access-individual:AccessObjectType ; | ||
access:values access-individual:ObjectPropertyStatementValueSet ; | ||
access:values access-individual:DataPropertyStatementValueSet ; | ||
access:values access-individual:FauxObjectPropertyStatementValueSet ; | ||
access:values access-individual:FauxDataPropertyStatementValueSet ; | ||
. | ||
|
||
:OperationCheck a access:Check ; | ||
access:useOperator access-individual:Equals ; | ||
access:hasTypeToCheck access-individual:Operation ; | ||
access:values access-individual:DisplayOperationValueSet ; | ||
. | ||
|
||
:SubjectRoleCheck a access:Check ; | ||
access:useOperator access-individual:Equals ; | ||
access:hasTypeToCheck access-individual:SubjectRole ; | ||
access:values access-individual:SelfEditorRoleValueSet ; | ||
. | ||
|
||
:StatementPredicateCheck a access:Check ; | ||
access:useOperator access-individual:OneOf ; | ||
access:hasTypeToCheck access-individual:StatementPredicateUri ; | ||
access:values :SelfEditorHideNotRelatedObjectPropertyValueSet ; | ||
access:values :SelfEditorHideNotRelatedDataPropertyValueSet ; | ||
access:values :SelfEditorHideNotRelatedFauxObjectPropertyValueSet ; | ||
access:values :SelfEditorHideNotRelatedFauxDataPropertyValueSet ; | ||
. | ||
|
||
:AccessObjectUriCheck a access:Check ; | ||
access:useOperator access-individual:OneOf ; | ||
access:hasTypeToCheck access-individual:AccessObjectUri ; | ||
access:values :SelfEditorHideNotRelatedObjectPropertyValueSet ; | ||
access:values :SelfEditorHideNotRelatedDataPropertyValueSet ; | ||
access:values :SelfEditorHideNotRelatedFauxObjectPropertyValueSet ; | ||
access:values :SelfEditorHideNotRelatedFauxDataPropertyValueSet ; | ||
. | ||
|
||
#Value sets | ||
|
||
:SelfEditorHideNotRelatedObjectPropertyValueSet a access:ValueSet ; | ||
access:containsElementsOfType access-individual:ObjectProperty ; | ||
. | ||
|
||
:SelfEditorHideNotRelatedDataPropertyValueSet a access:ValueSet ; | ||
access:containsElementsOfType access-individual:DataProperty ; | ||
. | ||
|
||
:SelfEditorHideNotRelatedFauxObjectPropertyValueSet a access:ValueSet ; | ||
access:containsElementsOfType access-individual:FauxObjectProperty ; | ||
. | ||
|
||
:SelfEditorHideNotRelatedFauxDataPropertyValueSet a access:ValueSet ; | ||
access:containsElementsOfType access-individual:FauxDataProperty ; | ||
. |