Changing PageController to use permissions on pages. VIVO-63 Adding Permissions to display model.
This commit is contained in:
parent
b425682a92
commit
e6c2596a35
7 changed files with 415 additions and 147 deletions
|
@ -3,7 +3,7 @@
|
||||||
package edu.cornell.mannlib.vitro.webapp.controller.freemarker;
|
package edu.cornell.mannlib.vitro.webapp.controller.freemarker;
|
||||||
|
|
||||||
|
|
||||||
import java.lang.reflect.InvocationTargetException;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
@ -19,6 +19,8 @@ import org.apache.commons.logging.LogFactory;
|
||||||
import edu.cornell.mannlib.vitro.webapp.auth.permissions.SimplePermission;
|
import edu.cornell.mannlib.vitro.webapp.auth.permissions.SimplePermission;
|
||||||
import edu.cornell.mannlib.vitro.webapp.auth.policy.PolicyHelper;
|
import edu.cornell.mannlib.vitro.webapp.auth.policy.PolicyHelper;
|
||||||
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.Actions;
|
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.Actions;
|
||||||
|
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.SimpleRequestedAction;
|
||||||
|
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces.RequestedAction;
|
||||||
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces.RequiresActions;
|
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces.RequiresActions;
|
||||||
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
|
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
|
||||||
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.ResponseValues;
|
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.ResponseValues;
|
||||||
|
@ -51,28 +53,65 @@ public class PageController extends FreemarkerHttpServlet{
|
||||||
@Override
|
@Override
|
||||||
protected Actions requiredActions(VitroRequest vreq) {
|
protected Actions requiredActions(VitroRequest vreq) {
|
||||||
try {
|
try {
|
||||||
Actions actAcc = null;
|
Actions pageActs = getActionsForPage( vreq );
|
||||||
|
Actions dgActs = getActionsForDataGetters( vreq );
|
||||||
|
|
||||||
|
if( pageActs == null && dgActs == null){
|
||||||
|
return Actions.AUTHORIZED;
|
||||||
|
}else if( pageActs == null && dgActs != null ){
|
||||||
|
return dgActs;
|
||||||
|
}else{
|
||||||
|
return pageActs;
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
// TODO Auto-generated catch block
|
||||||
|
log.debug(e);
|
||||||
|
return Actions.UNAUTHORIZED;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get all the required actions directly required for the page.
|
||||||
|
*/
|
||||||
|
private Actions getActionsForPage( VitroRequest vreq ) throws Exception{
|
||||||
|
List<String> simplePremUris = vreq.getWebappDaoFactory().getPageDao()
|
||||||
|
.getRequiredActions( getPageUri(vreq) );
|
||||||
|
|
||||||
|
List<RequestedAction> actions = new ArrayList<RequestedAction>();
|
||||||
|
|
||||||
|
for( String uri : simplePremUris ){
|
||||||
|
actions.add( new SimpleRequestedAction(uri) );
|
||||||
|
}
|
||||||
|
|
||||||
|
return new Actions( actions );
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Get Actions object for the data getters for the page.
|
||||||
|
*/
|
||||||
|
private Actions getActionsForDataGetters(VitroRequest vreq ){
|
||||||
|
try {
|
||||||
|
Actions dgActs = null;
|
||||||
|
|
||||||
List<DataGetter> dgList =
|
List<DataGetter> dgList =
|
||||||
DataGetterUtils.getDataGettersForPage(vreq, vreq.getDisplayModel(), getPageUri(vreq));
|
DataGetterUtils.getDataGettersForPage(
|
||||||
|
vreq, vreq.getDisplayModel(), getPageUri(vreq));
|
||||||
|
|
||||||
for( DataGetter dg : dgList){
|
for( DataGetter dg : dgList){
|
||||||
if( dg instanceof RequiresActions ){
|
if( dg instanceof RequiresActions ){
|
||||||
RequiresActions ra = (RequiresActions) dg;
|
RequiresActions ra = (RequiresActions) dg;
|
||||||
Actions acts = ra.requiredActions(vreq);
|
Actions acts = ra.requiredActions(vreq);
|
||||||
if( acts != null ){
|
if( acts != null ){
|
||||||
if( actAcc != null ){
|
if( dgActs != null ){
|
||||||
actAcc.and( acts );
|
dgActs.and( acts );
|
||||||
}else{
|
}else{
|
||||||
actAcc = acts;
|
dgActs = acts;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( actAcc == null )
|
return dgActs;
|
||||||
return Actions.AUTHORIZED;
|
|
||||||
else
|
|
||||||
return actAcc;
|
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// TODO Auto-generated catch block
|
// TODO Auto-generated catch block
|
||||||
log.debug(e);
|
log.debug(e);
|
||||||
|
|
|
@ -48,6 +48,7 @@ public class DisplayVocabulary {
|
||||||
public static final String ITEM_TO_PAGE = NS + "toPage";
|
public static final String ITEM_TO_PAGE = NS + "toPage";
|
||||||
public static final String HAS_ELEMENT = NS + "hasElement";
|
public static final String HAS_ELEMENT = NS + "hasElement";
|
||||||
public static final String USES_DATAGETTER_CLASS = NS + "usesDataGetterClass";
|
public static final String USES_DATAGETTER_CLASS = NS + "usesDataGetterClass";
|
||||||
|
public static final String REQUIRED_ACTIONS = NS + "requiredAction";
|
||||||
|
|
||||||
/**Data Getter object properties **/
|
/**Data Getter object properties **/
|
||||||
public static final String HAS_DATA_GETTER = NS + "hasDataGetter";
|
public static final String HAS_DATA_GETTER = NS + "hasDataGetter";
|
||||||
|
|
|
@ -29,4 +29,10 @@ public interface PageDao {
|
||||||
|
|
||||||
List<String> getDataGetterClass(String pageUri);
|
List<String> getDataGetterClass(String pageUri);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the required actions directly associated with a page.
|
||||||
|
* Does not get required actions for any data getters that are
|
||||||
|
* related to the page.
|
||||||
|
*/
|
||||||
|
List<String> getRequiredActions(String pageUri);
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,7 @@ import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
@ -78,6 +79,13 @@ public class PageDaoJena extends JenaBaseDao implements PageDao {
|
||||||
" ?dg rdf:type ?dataGetterType . \n" +
|
" ?dg rdf:type ?dataGetterType . \n" +
|
||||||
"} \n" ;
|
"} \n" ;
|
||||||
|
|
||||||
|
//Get the required actions directly associated with a page
|
||||||
|
static final protected String requiredActionsQuery =
|
||||||
|
prefixes + "\n" +
|
||||||
|
"SELECT ?requiredAction WHERE{\n" +
|
||||||
|
" ?pageUri <" + DisplayVocabulary.REQUIRED_ACTIONS + "> ?requiredAction .\n"+
|
||||||
|
"}";
|
||||||
|
|
||||||
//Get data getter URIs
|
//Get data getter URIs
|
||||||
static final protected String dataGetterURIsQueryString =
|
static final protected String dataGetterURIsQueryString =
|
||||||
prefixes + "\n" +
|
prefixes + "\n" +
|
||||||
|
@ -520,9 +528,53 @@ public class PageDaoJena extends JenaBaseDao implements PageDao {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the requiredActions directly associated with page.
|
||||||
|
*/
|
||||||
|
public List<String> getRequiredActions(String pageUri){
|
||||||
|
QuerySolutionMap initialBindings = new QuerySolutionMap();
|
||||||
|
initialBindings.add("pageUri", ResourceFactory.createResource(pageUri));
|
||||||
|
List<String> actions = new ArrayList<String>();
|
||||||
|
|
||||||
|
Model dModel = getOntModelSelector().getDisplayModel();
|
||||||
|
try{
|
||||||
|
QueryExecution qe =
|
||||||
|
QueryExecutionFactory.create( requiredActionsQuery, dModel, initialBindings);
|
||||||
|
actions = executeQueryToList( qe );
|
||||||
|
qe.close();
|
||||||
|
}finally{
|
||||||
|
dModel.enterCriticalSection(false);
|
||||||
|
}
|
||||||
|
return actions;
|
||||||
|
}
|
||||||
|
|
||||||
/* *************************** Utility methods ********************************* */
|
/* *************************** Utility methods ********************************* */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Assumes single bound variable in solution.
|
||||||
|
*/
|
||||||
|
protected List<String> executeQueryToList(QueryExecution qex){
|
||||||
|
List<String> rv = new LinkedList<String>();
|
||||||
|
ResultSet results = qex.execSelect();
|
||||||
|
while (results.hasNext()) {
|
||||||
|
rv.add(querySolutionToString( results.nextSolution() ));
|
||||||
|
}
|
||||||
|
return rv;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Assumes single bound variable in solution.
|
||||||
|
*/
|
||||||
|
protected String querySolutionToString( QuerySolution soln ){
|
||||||
|
Iterator<String> varNames = soln.varNames();
|
||||||
|
if(varNames.hasNext()){
|
||||||
|
String name = varNames.next();
|
||||||
|
return nodeToString( soln.get(name) );
|
||||||
|
}else{
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Converts a sparql query that returns a multiple rows to a list of maps.
|
* Converts a sparql query that returns a multiple rows to a list of maps.
|
||||||
* The maps will have column names as keys to the values.
|
* The maps will have column names as keys to the values.
|
||||||
|
@ -549,6 +601,8 @@ public class PageDaoJena extends JenaBaseDao implements PageDao {
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static protected Object nodeToObject( RDFNode node ){
|
static protected Object nodeToObject( RDFNode node ){
|
||||||
if( node == null ){
|
if( node == null ){
|
||||||
return "";
|
return "";
|
||||||
|
@ -582,11 +636,6 @@ public class PageDaoJena extends JenaBaseDao implements PageDao {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
protected Map<String,Object> resultsToMap(){
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,3 +15,13 @@ rdf:type
|
||||||
"true"^^xsd:boolean ;
|
"true"^^xsd:boolean ;
|
||||||
|
|
||||||
|
|
||||||
|
display:requiresAction
|
||||||
|
a owl:ObjectProperty ;
|
||||||
|
rdfs:label "Required Action"@en-US ;
|
||||||
|
rdfs:comment "Indicates that a resource has a required action that may need to be authorized" .
|
||||||
|
rdfs:range display:RequiredAction .
|
||||||
|
<http://vitro.mannlib.cornell.edu/ns/vitro/0.7#offerCreateNewOptionAnnot>
|
||||||
|
"true"^^xsd:boolean ;
|
||||||
|
<http://vitro.mannlib.cornell.edu/ns/vitro/0.7#selectFromExistingAnnot>
|
||||||
|
"true"^^xsd:boolean ;
|
||||||
|
|
||||||
|
|
|
@ -4,59 +4,65 @@
|
||||||
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
|
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
|
||||||
@prefix owl: <http://www.w3.org/2002/07/owl#> .
|
@prefix owl: <http://www.w3.org/2002/07/owl#> .
|
||||||
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
||||||
|
@prefix display: <http://vitro.mannlib.cornell.edu/ontologies/display/1.1#> .
|
||||||
|
@prefix vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#> .
|
||||||
|
|
||||||
#########Classes#########
|
#########Classes#########
|
||||||
###Basic
|
###Basic
|
||||||
owl:Class
|
owl:Class a owl:Class .
|
||||||
a owl:Class .
|
owl:Ontology a owl:Class .
|
||||||
|
owl:AnnotationProperty a owl:Class .
|
||||||
owl:Ontology
|
owl:DatatypeProperty a owl:
|
||||||
a owl:Class .
|
owl:ObjectProperty a owl:Class .
|
||||||
|
|
||||||
owl:AnnotationProperty
|
|
||||||
a owl:Class .
|
|
||||||
|
|
||||||
owl:DatatypeProperty
|
|
||||||
a owl:Class .
|
|
||||||
|
|
||||||
owl:ObjectProperty
|
|
||||||
a owl:Class .
|
|
||||||
|
|
||||||
###Display Model
|
###Display Model
|
||||||
<http://vitro.mannlib.cornell.edu/ontologies/display/1.1#MainMenu>
|
display:MainMenu
|
||||||
a owl:Class ;
|
a owl:Class ;
|
||||||
<http://vitro.mannlib.cornell.edu/ns/vitro/0.7#customDisplayViewAnnot>
|
vitro:customDisplayViewAnnot "individual-menu.ftl"^^xsd:string .
|
||||||
"individual-menu.ftl"^^xsd:string .
|
|
||||||
|
|
||||||
<http://vitro.mannlib.cornell.edu/ontologies/display/1.1#NavigationElement>
|
display:NavigationElement a owl:Class .
|
||||||
a owl:Class .
|
|
||||||
|
|
||||||
<http://vitro.mannlib.cornell.edu/ontologies/display/1.1#Page>
|
display:Page a owl:Class .
|
||||||
a owl:Class .
|
|
||||||
|
|
||||||
<http://vitro.mannlib.cornell.edu/ontologies/display/1.1#HomePage>
|
display:HomePage a owl:Class .
|
||||||
a owl:Class .
|
|
||||||
|
|
||||||
<http://vitro.mannlib.cornell.edu/ontologies/display/1.1#ClassGroupPage>
|
display:ClassGroupPage a owl:Class .
|
||||||
a owl:Class .
|
|
||||||
|
|
||||||
<http://vitro.mannlib.cornell.edu/ontologies/display/1.1#IndividualsForClassesPage>
|
display:IndividualsForClassesPage a owl:Class .
|
||||||
a owl:Class .
|
|
||||||
|
|
||||||
<http://vitro.mannlib.cornell.edu/ontologies/display/1.1#InternalClassesPage>
|
display:InternalClassesPage a owl:Class .
|
||||||
a owl:Class .
|
|
||||||
|
|
||||||
<http://vitro.mannlib.cornell.edu/ontologies/display/1.1#DataGetter>
|
display:DataGetter a owl:Class .
|
||||||
a owl:Class .
|
|
||||||
|
display:RequiredAction a owl:Class ;
|
||||||
|
rdfs:comment "Represents a action that may need authorization to perform.".
|
||||||
|
|
||||||
<java:edu.cornell.mannlib.vitro.webapp.utils.dataGetter.SparqlQueryDataGetter>
|
<java:edu.cornell.mannlib.vitro.webapp.utils.dataGetter.SparqlQueryDataGetter>
|
||||||
a owl:Class .
|
a owl:Class ;
|
||||||
|
rdfs:comment "Data getter for running a SPARQL query."
|
||||||
|
|
||||||
##Adding a data getter type that is Solr Class search, i.e. get individuals for VClass
|
|
||||||
<java:edu.cornell.mannlib.vitro.webapp.utils.dataGetter.SolrIndividualsDataGetter>
|
<java:edu.cornell.mannlib.vitro.webapp.utils.dataGetter.SolrIndividualsDataGetter>
|
||||||
a owl:Class .
|
a owl:Class ;
|
||||||
|
rdfs:comment "A data getter for a Solr Class search, i.e. get individuals for VClass" .
|
||||||
|
|
||||||
|
<java:edu.cornell.mannlib.vitro.webapp.utils.dataGetter.SparqlUpdate>
|
||||||
|
a owl:Class ;
|
||||||
|
rdfs:comment "A data getter that runs a SPARQL Update" .
|
||||||
|
|
||||||
|
<java:edu.cornell.mannlib.vitro.webapp.utils.dataGetter.BrowseDataGetter>
|
||||||
|
a owl:Class ;
|
||||||
|
rdfs:comment "A data getter for a standard Vitro browse page" .
|
||||||
|
|
||||||
|
<java:edu.cornell.mannlib.vitro.webapp.utils.dataGetter.ClassGroupPageData>
|
||||||
|
a owl:Class ;
|
||||||
|
rdfs:comment "A data getter for a VClassGroup page".
|
||||||
|
|
||||||
|
<java:edu.cornell.mannlib.vitro.webapp.utils.dataGetter.FixedHTMLDataGetter>
|
||||||
|
a owl:Class ;
|
||||||
|
rdfs:comment "A data getter for a Fixed piece of HTML stored in RDF".
|
||||||
|
|
||||||
|
<java:edu.cornell.mannlib.vitro.webapp.utils.dataGetter.IndividualsForClassesDataGetter>
|
||||||
|
a owl:Class .
|
||||||
|
|
||||||
########Data Properties#########
|
########Data Properties#########
|
||||||
|
|
||||||
|
@ -64,67 +70,64 @@ owl:ObjectProperty
|
||||||
|
|
||||||
rdfs:comment
|
rdfs:comment
|
||||||
a owl:DatatypeProperty .
|
a owl:DatatypeProperty .
|
||||||
|
|
||||||
rdfs:label
|
rdfs:label
|
||||||
a owl:DatatypeProperty .
|
a owl:DatatypeProperty .
|
||||||
|
|
||||||
|
|
||||||
owl:versionInfo
|
owl:versionInfo
|
||||||
a owl:DatatypeProperty .
|
a owl:DatatypeProperty .
|
||||||
|
|
||||||
###Vitro model
|
###Vitro model
|
||||||
|
|
||||||
<http://vitro.mannlib.cornell.edu/ns/vitro/0.7#modTime>
|
vitro:modTime
|
||||||
a owl:DatatypeProperty .
|
a owl:DatatypeProperty .
|
||||||
<http://vitro.mannlib.cornell.edu/ns/vitro/0.7#displayRank>
|
vitro:displayRank
|
||||||
a owl:DatatypeProperty .
|
a owl:DatatypeProperty .
|
||||||
|
vitro:customDisplayViewAnnot
|
||||||
<http://vitro.mannlib.cornell.edu/ns/vitro/0.7#customDisplayViewAnnot>
|
|
||||||
a owl:DatatypeProperty .
|
a owl:DatatypeProperty .
|
||||||
|
|
||||||
###Display model
|
###Display model
|
||||||
|
|
||||||
<http://vitro.mannlib.cornell.edu/ontologies/display/1.1#listViewConfigFile>
|
display:listViewConfigFile
|
||||||
a owl:DatatypeProperty .
|
|
||||||
<http://vitro.mannlib.cornell.edu/ontologies/display/1.1#title>
|
|
||||||
a owl:DatatypeProperty .
|
a owl:DatatypeProperty .
|
||||||
|
|
||||||
<http://vitro.mannlib.cornell.edu/ontologies/display/1.1#urlMapping>
|
display:title
|
||||||
a owl:DatatypeProperty .
|
a owl:DatatypeProperty .
|
||||||
|
|
||||||
<http://vitro.mannlib.cornell.edu/ontologies/display/1.1#requiresBodyTemplate>
|
display:urlMapping
|
||||||
a owl:DatatypeProperty .
|
a owl:DatatypeProperty .
|
||||||
|
|
||||||
<http://vitro.mannlib.cornell.edu/ontologies/display/1.1#isSelfContainedTemplate>
|
display:requiresBodyTemplate
|
||||||
a owl:DatatypeProperty .
|
a owl:DatatypeProperty .
|
||||||
|
|
||||||
<http://vitro.mannlib.cornell.edu/ontologies/display/1.1#menuPosition>
|
display:isSelfContainedTemplate
|
||||||
|
a owl:DatatypeProperty .
|
||||||
|
|
||||||
|
display:menuPosition
|
||||||
a owl:DatatypeProperty ;
|
a owl:DatatypeProperty ;
|
||||||
<http://vitro.mannlib.cornell.edu/ns/vitro/0.7#displayLimitAnnot>
|
vitro:displayLimitAnnot
|
||||||
"1"^^xsd:int .
|
"1"^^xsd:int .
|
||||||
|
|
||||||
<http://vitro.mannlib.cornell.edu/ontologies/display/1.1#linkText>
|
display:linkText
|
||||||
a owl:DatatypeProperty .
|
a owl:DatatypeProperty .
|
||||||
|
|
||||||
<http://vitro.mannlib.cornell.edu/ontologies/display/1.1#hasMenuText>
|
display:hasMenuText
|
||||||
a owl:DatatypeProperty .
|
a owl:DatatypeProperty .
|
||||||
|
|
||||||
<http://vitro.mannlib.cornell.edu/ontologies/display/1.1#usesDataGetterClass>
|
display:usesDataGetterClass
|
||||||
a owl:DatatypeProperty .
|
a owl:DatatypeProperty .
|
||||||
|
|
||||||
<http://vitro.mannlib.cornell.edu/ontologies/display/1.1#query>
|
display:query
|
||||||
a owl:DatatypeProperty .
|
a owl:DatatypeProperty .
|
||||||
|
|
||||||
<http://vitro.mannlib.cornell.edu/ontologies/display/1.1#saveToVar>
|
display:saveToVar
|
||||||
a owl:DatatypeProperty.
|
a owl:DatatypeProperty.
|
||||||
|
|
||||||
<http://vitro.mannlib.cornell.edu/ontologies/display/1.1#queryModel>
|
display:queryModel
|
||||||
a owl:DatatypeProperty.
|
a owl:DatatypeProperty.
|
||||||
|
|
||||||
<http://vitro.mannlib.cornell.edu/ontologies/display/1.1#htmlValue>
|
display:htmlValue
|
||||||
a owl:DatatypeProperty.
|
a owl:DatatypeProperty.
|
||||||
|
|
||||||
<http://vitro.mannlib.cornell.edu/ontologies/display/1.1#cannotDeletePage>
|
display:cannotDeletePage
|
||||||
a owl:DatatypeProperty.
|
a owl:DatatypeProperty.
|
||||||
|
|
||||||
######### Object Properties#########
|
######### Object Properties#########
|
||||||
|
@ -136,10 +139,9 @@ rdfs:domain
|
||||||
owl:topObjectProperty
|
owl:topObjectProperty
|
||||||
a owl:ObjectProperty .
|
a owl:ObjectProperty .
|
||||||
|
|
||||||
##Adding object property defining class for solr data getter
|
display:hasVClassId
|
||||||
<http://vitro.mannlib.cornell.edu/ontologies/display/1.1#hasVClassId>
|
a owl:ObjectProperty ;
|
||||||
a owl:ObjectProperty.
|
rdfs:comment "Object property defining class for solr data getter" .
|
||||||
|
|
||||||
|
|
||||||
###Vitro properties without which individual templates throw errors as are required
|
###Vitro properties without which individual templates throw errors as are required
|
||||||
|
|
||||||
|
@ -148,71 +150,73 @@ owl:topObjectProperty
|
||||||
rdfs:range <http://vitro.mannlib.cornell.edu/ns/vitro/public#File> ;
|
rdfs:range <http://vitro.mannlib.cornell.edu/ns/vitro/public#File> ;
|
||||||
rdfs:subPropertyOf <http://vitro.mannlib.cornell.edu/ns/vitro/public#mainImage> , owl:topObjectProperty .
|
rdfs:subPropertyOf <http://vitro.mannlib.cornell.edu/ns/vitro/public#mainImage> , owl:topObjectProperty .
|
||||||
|
|
||||||
<http://vitro.mannlib.cornell.edu/ns/vitro/0.7#primaryLink>
|
vitro:primaryLink
|
||||||
a owl:ObjectProperty ;
|
a owl:ObjectProperty ;
|
||||||
rdfs:label "Primary Link"@en-US ;
|
rdfs:label "Primary Link"@en-US ;
|
||||||
rdfs:range <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#Link> ;
|
rdfs:range vitro:Link ;
|
||||||
rdfs:subPropertyOf <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#primaryLink> , owl:topObjectProperty ;
|
rdfs:subPropertyOf vitro:primaryLink , owl:topObjectProperty ;
|
||||||
<http://vitro.mannlib.cornell.edu/ns/vitro/0.7#customEntryFormAnnot>
|
vitro:customEntryFormAnnot
|
||||||
"defaultLinkForm.jsp"^^xsd:string ;
|
"defaultLinkForm.jsp"^^xsd:string ;
|
||||||
<http://vitro.mannlib.cornell.edu/ns/vitro/0.7#forceStubDeletionAnnot>
|
vitro:forceStubDeletionAnnot
|
||||||
"true"^^xsd:boolean ;
|
"true"^^xsd:boolean ;
|
||||||
<http://vitro.mannlib.cornell.edu/ns/vitro/0.7#offerCreateNewOptionAnnot>
|
vitro:offerCreateNewOptionAnnot
|
||||||
"true"^^xsd:boolean ;
|
"true"^^xsd:boolean ;
|
||||||
<http://vitro.mannlib.cornell.edu/ns/vitro/0.7#selectFromExistingAnnot>
|
vitro:selectFromExistingAnnot
|
||||||
"false"^^xsd:boolean ;
|
"false"^^xsd:boolean ;
|
||||||
<http://vitro.mannlib.cornell.edu/ns/vitro/0.7#stubObjectPropertyAnnot>
|
vitro:stubObjectPropertyAnnot
|
||||||
"true"^^xsd:boolean .
|
"true"^^xsd:boolean .
|
||||||
|
|
||||||
rdf:type
|
rdf:type
|
||||||
a owl:ObjectProperty ;
|
a owl:ObjectProperty ;
|
||||||
rdfs:label "RDF Type"@en-US ;
|
rdfs:label "RDF Type"@en-US ;
|
||||||
rdfs:range owl:Class ;
|
rdfs:range owl:Class ;
|
||||||
<http://vitro.mannlib.cornell.edu/ns/vitro/0.7#customEntryFormAnnot>
|
vitro:customEntryFormAnnot
|
||||||
"edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.RdfTypeGenerator"^^xsd:string ;
|
"edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.RdfTypeGenerator"^^xsd:string ;
|
||||||
<http://vitro.mannlib.cornell.edu/ns/vitro/0.7#offerCreateNewOptionAnnot>
|
vitro:offerCreateNewOptionAnnot
|
||||||
"true"^^xsd:boolean ;
|
"true"^^xsd:boolean ;
|
||||||
<http://vitro.mannlib.cornell.edu/ns/vitro/0.7#selectFromExistingAnnot>
|
vitro:selectFromExistingAnnot
|
||||||
"true"^^xsd:boolean .
|
"true"^^xsd:boolean .
|
||||||
|
|
||||||
|
|
||||||
<http://vitro.mannlib.cornell.edu/ns/vitro/0.7#additionalLink>
|
vitro:additionalLink
|
||||||
a owl:ObjectProperty ;
|
a owl:ObjectProperty ;
|
||||||
rdfs:label "Additional Link"@en-US ;
|
rdfs:label "Additional Link"@en-US ;
|
||||||
rdfs:range <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#Link> ;
|
rdfs:range vitro:Link ;
|
||||||
rdfs:subPropertyOf <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#additionalLink> , owl:topObjectProperty ;
|
rdfs:subPropertyOf vitro:additionalLink , owl:topObjectProperty ;
|
||||||
<http://vitro.mannlib.cornell.edu/ns/vitro/0.7#customEntryFormAnnot>
|
vitro:customEntryFormAnnot
|
||||||
"defaultLinkForm.jsp"^^xsd:string ;
|
"defaultLinkForm.jsp"^^xsd:string ;
|
||||||
<http://vitro.mannlib.cornell.edu/ns/vitro/0.7#forceStubDeletionAnnot>
|
vitro:forceStubDeletionAnnot
|
||||||
"true"^^xsd:boolean ;
|
"true"^^xsd:boolean ;
|
||||||
<http://vitro.mannlib.cornell.edu/ns/vitro/0.7#offerCreateNewOptionAnnot>
|
vitro:offerCreateNewOptionAnnot
|
||||||
"true"^^xsd:boolean ;
|
"true"^^xsd:boolean ;
|
||||||
<http://vitro.mannlib.cornell.edu/ns/vitro/0.7#selectFromExistingAnnot>
|
vitro:selectFromExistingAnnot
|
||||||
"false"^^xsd:boolean ;
|
"false"^^xsd:boolean ;
|
||||||
<http://vitro.mannlib.cornell.edu/ns/vitro/0.7#stubObjectPropertyAnnot>
|
vitro:stubObjectPropertyAnnot
|
||||||
"true"^^xsd:boolean .
|
"true"^^xsd:boolean .
|
||||||
|
|
||||||
###Display model
|
###Display model
|
||||||
|
|
||||||
###Adding menu management customform annotation
|
display:hasElement
|
||||||
<http://vitro.mannlib.cornell.edu/ontologies/display/1.1#hasElement>
|
|
||||||
a owl:ObjectProperty .
|
a owl:ObjectProperty .
|
||||||
|
|
||||||
<http://vitro.mannlib.cornell.edu/ontologies/display/1.1#excludeClass>
|
display:excludeClass
|
||||||
a owl:ObjectProperty .
|
a owl:ObjectProperty .
|
||||||
|
|
||||||
<http://vitro.mannlib.cornell.edu/ontologies/display/1.1#toPage>
|
display:toPage
|
||||||
a owl:ObjectProperty .
|
a owl:ObjectProperty .
|
||||||
|
|
||||||
<http://vitro.mannlib.cornell.edu/ontologies/display/1.1#forClassGroup>
|
display:forClassGroup
|
||||||
a owl:ObjectProperty .
|
a owl:ObjectProperty .
|
||||||
|
|
||||||
<http://vitro.mannlib.cornell.edu/ontologies/display/1.1#hasDataGetter>
|
display:hasDataGetter
|
||||||
a owl:ObjectProperty .
|
a owl:ObjectProperty .
|
||||||
|
|
||||||
<http://vitro.mannlib.cornell.edu/ontologies/display/1.1#getIndividualsForClass>
|
display:getIndividualsForClass
|
||||||
a owl:ObjectProperty .
|
a owl:ObjectProperty .
|
||||||
|
|
||||||
<http://vitro.mannlib.cornell.edu/ontologies/display/1.1#restrictResultsByClass>
|
display:restrictResultsByClass
|
||||||
|
a owl:ObjectProperty .
|
||||||
|
|
||||||
|
display:requiresAction
|
||||||
a owl:ObjectProperty .
|
a owl:ObjectProperty .
|
||||||
|
|
||||||
|
|
159
webapp/web/WEB-INF/ontologies/app/permissions.n3
Normal file
159
webapp/web/WEB-INF/ontologies/app/permissions.n3
Normal file
|
@ -0,0 +1,159 @@
|
||||||
|
# $This file is distributed under the terms of the license in /doc/license.txt$
|
||||||
|
|
||||||
|
@prefix owl: <http://www.w3.org/2002/07/owl#> .
|
||||||
|
@prefix display: <http://vitro.mannlib.cornell.edu/ontologies/display/1.1#> .
|
||||||
|
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
||||||
|
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
|
||||||
|
@prefix action: <java:edu.cornell.mannlib.vitro.webapp.auth.permissions.SimplePermission#> .
|
||||||
|
|
||||||
|
# These are the reqired action objects from the SimplePermission.java.
|
||||||
|
|
||||||
|
action:AccessSpecialDataModels
|
||||||
|
a display:RequiredAction ;
|
||||||
|
rdfs:label "ACCESS_SPECIAL_DATA_MODELS" .
|
||||||
|
|
||||||
|
|
||||||
|
action:DoBackEndEditing
|
||||||
|
a display:RequiredAction ;
|
||||||
|
rdfs:label "DO_BACK_END_EDITING" .
|
||||||
|
|
||||||
|
|
||||||
|
action:DoFrontEndEditing
|
||||||
|
a display:RequiredAction ;
|
||||||
|
rdfs:label "DO_FRONT_END_EDITING" .
|
||||||
|
|
||||||
|
|
||||||
|
action:EditOntology
|
||||||
|
a display:RequiredAction ;
|
||||||
|
rdfs:label "EDIT_ONTOLOGY" .
|
||||||
|
|
||||||
|
|
||||||
|
action:EditOwnAccount
|
||||||
|
a display:RequiredAction ;
|
||||||
|
rdfs:label "EDIT_OWN_ACCOUNT" .
|
||||||
|
|
||||||
|
|
||||||
|
action:EditSiteInformation
|
||||||
|
a display:RequiredAction ;
|
||||||
|
rdfs:label "EDIT_SITE_INFORMATION" .
|
||||||
|
|
||||||
|
|
||||||
|
action:LoginDuringMaintenance
|
||||||
|
a display:RequiredAction ;
|
||||||
|
rdfs:label "LOGIN_DURING_MAINTENANCE" .
|
||||||
|
|
||||||
|
|
||||||
|
action:ManageMenus
|
||||||
|
a display:RequiredAction ;
|
||||||
|
rdfs:label "MANAGE_MENUS" .
|
||||||
|
|
||||||
|
|
||||||
|
action:ManageOwnProxies
|
||||||
|
a display:RequiredAction ;
|
||||||
|
rdfs:label "MANAGE_OWN_PROXIES" .
|
||||||
|
|
||||||
|
|
||||||
|
action:ManagePortals
|
||||||
|
a display:RequiredAction ;
|
||||||
|
rdfs:label "MANAGE_PORTALS" .
|
||||||
|
|
||||||
|
|
||||||
|
action:ManageProxies
|
||||||
|
a display:RequiredAction ;
|
||||||
|
rdfs:label "MANAGE_PROXIES" .
|
||||||
|
|
||||||
|
|
||||||
|
action:ManageSearchIndex
|
||||||
|
a display:RequiredAction ;
|
||||||
|
rdfs:label "MANAGE_SEARCH_INDEX" .
|
||||||
|
|
||||||
|
|
||||||
|
action:ManageTabs
|
||||||
|
a display:RequiredAction ;
|
||||||
|
rdfs:label "MANAGE_TABS" .
|
||||||
|
|
||||||
|
|
||||||
|
action:ManageUserAccounts
|
||||||
|
a display:RequiredAction ;
|
||||||
|
rdfs:label "MANAGE_USER_ACCOUNTS" .
|
||||||
|
|
||||||
|
|
||||||
|
action:QueryFullModel
|
||||||
|
a display:RequiredAction ;
|
||||||
|
rdfs:label "QUERY_FULL_MODEL" .
|
||||||
|
|
||||||
|
|
||||||
|
action:QueryUserAccountsModel
|
||||||
|
a display:RequiredAction ;
|
||||||
|
rdfs:label "QUERY_USER_ACCOUNTS_MODEL" .
|
||||||
|
|
||||||
|
|
||||||
|
action:RebuildVClassGroupCache
|
||||||
|
a display:RequiredAction ;
|
||||||
|
rdfs:label "REBUILD_VCLASS_GROUP_CACHE" .
|
||||||
|
|
||||||
|
|
||||||
|
action:RefreshVisualizationCache
|
||||||
|
a display:RequiredAction ;
|
||||||
|
rdfs:label "REFRESH_VISUALIZATION_CACHE" .
|
||||||
|
|
||||||
|
|
||||||
|
action:SeeIndividualEditingPanel
|
||||||
|
a display:RequiredAction ;
|
||||||
|
rdfs:label "SEE_INDVIDUAL_EDITING_PANEL" .
|
||||||
|
|
||||||
|
|
||||||
|
action:SeeRevisionInfo
|
||||||
|
a display:RequiredAction ;
|
||||||
|
rdfs:label "SEE_REVISION_INFO" .
|
||||||
|
|
||||||
|
|
||||||
|
action:SeeSiteAdminPage
|
||||||
|
a display:RequiredAction ;
|
||||||
|
rdfs:label "SEE_SITE_ADMIN_PAGE" .
|
||||||
|
|
||||||
|
|
||||||
|
action:SeeStartupStatus
|
||||||
|
a display:RequiredAction ;
|
||||||
|
rdfs:label "SEE_STARTUP_STATUS" .
|
||||||
|
|
||||||
|
|
||||||
|
action:SeeVerbosePropertyInformation
|
||||||
|
a display:RequiredAction ;
|
||||||
|
rdfs:label "SEE_VERBOSE_PROPERTY_INFORMATION" .
|
||||||
|
|
||||||
|
|
||||||
|
action:UseAdvancedDataToolsPages
|
||||||
|
a display:RequiredAction ;
|
||||||
|
rdfs:label "USE_ADVANCED_DATA_TOOLS_PAGES" .
|
||||||
|
|
||||||
|
|
||||||
|
action:UseSparqlQueryPage
|
||||||
|
a display:RequiredAction ;
|
||||||
|
rdfs:label "USE_SPARQL_QUERY_PAGE" .
|
||||||
|
|
||||||
|
|
||||||
|
action:UseBasicAjaxControllers
|
||||||
|
a display:RequiredAction ;
|
||||||
|
rdfs:label "USE_BASIC_AJAX_CONTROLLERS" .
|
||||||
|
|
||||||
|
|
||||||
|
action:UseMiscellaneousAdminPages
|
||||||
|
a display:RequiredAction ;
|
||||||
|
rdfs:label "USE_MISCELLANEOUS_ADMIN_PAGES" .
|
||||||
|
|
||||||
|
|
||||||
|
action:UseMiscellaneousCuratorPages
|
||||||
|
a display:RequiredAction ;
|
||||||
|
rdfs:label "USE_MISCELLANEOUS_CURATOR_PAGES" .
|
||||||
|
|
||||||
|
|
||||||
|
action:UseMiscellaneousEditorPages
|
||||||
|
a display:RequiredAction ;
|
||||||
|
rdfs:label "USE_MISCELLANEOUS_EDITOR_PAGES" .
|
||||||
|
|
||||||
|
|
||||||
|
action:UseMiscellaneousPages
|
||||||
|
a display:RequiredAction ;
|
||||||
|
rdfs:label "USE_MISCELLANEOUS_PAGES" .
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue