VIVO-118 Make getDataPropertyByURI() an unfiltered operation.

This method is used to determine whether a given property is a data property or not. If the user is restricted from displaying this property, then the filtered answer is NO. But that is really inappropriate. The real questions are whether the user can see the values of this property, and whether the user can add or modify values of this property -- not whether the user can see or modify the property itself.
This commit is contained in:
j2blake 2013-05-31 12:38:17 -04:00
parent 9a6f300993
commit 5bf80c3e14

View file

@ -95,24 +95,14 @@ class DataPropertyDaoFiltering extends BaseFiltering implements DataPropertyDao{
@Override @Override
public DataProperty getDataPropertyByURI(String dataPropertyURI) { public DataProperty getDataPropertyByURI(String dataPropertyURI) {
DataProperty prop = innerDataPropertyDao.getDataPropertyByURI(dataPropertyURI); return innerDataPropertyDao.getDataPropertyByURI(dataPropertyURI);
if( prop != null ){
Boolean acceptable = filters.getDataPropertyFilter().fn(prop);
if( acceptable == Boolean.TRUE )
return prop;
else
return null;
}
return null;
} }
@Override @Override
public String insertDataProperty(DataProperty dataProperty) throws InsertException { public String insertDataProperty(DataProperty dataProperty) throws InsertException {
return innerDataPropertyDao.insertDataProperty(dataProperty); return innerDataPropertyDao.insertDataProperty(dataProperty);
} }
@Override @Override
public void updateDataProperty(DataProperty dataProperty) { public void updateDataProperty(DataProperty dataProperty) {
innerDataPropertyDao.updateDataProperty(dataProperty); innerDataPropertyDao.updateDataProperty(dataProperty);