Revert "don't create add url if neither of 'select from existing' nor 'provide selection' options set (#385)" (#389)
This reverts commit 6c9e21544a
.
This commit is contained in:
parent
329b8e4100
commit
f19d0a08c2
1 changed files with 1 additions and 9 deletions
|
@ -113,7 +113,7 @@ public abstract class ObjectPropertyTemplateModel extends PropertyTemplateModel
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void setAddUrl(ObjectProperty property) {
|
protected void setAddUrl(Property property) {
|
||||||
// Is the add link suppressed for this property?
|
// Is the add link suppressed for this property?
|
||||||
if (property.isAddLinkSuppressed()) {
|
if (property.isAddLinkSuppressed()) {
|
||||||
return;
|
return;
|
||||||
|
@ -125,10 +125,6 @@ public abstract class ObjectPropertyTemplateModel extends PropertyTemplateModel
|
||||||
if ( ! PolicyHelper.isAuthorizedForActions(vreq, action) ) {
|
if ( ! PolicyHelper.isAuthorizedForActions(vreq, action) ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isNotAllowedToCreateOrSelect(property)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
String rangeUri = (property instanceof ObjectProperty)
|
String rangeUri = (property instanceof ObjectProperty)
|
||||||
? ((ObjectProperty) property).getRangeVClassURI()
|
? ((ObjectProperty) property).getRangeVClassURI()
|
||||||
|
@ -156,10 +152,6 @@ public abstract class ObjectPropertyTemplateModel extends PropertyTemplateModel
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isNotAllowedToCreateOrSelect(ObjectProperty property) {
|
|
||||||
return !property.getSelectFromExisting() && !property.getOfferCreateNewOption();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Pull this into a protected method so we can stub it out in the unit tests.
|
* Pull this into a protected method so we can stub it out in the unit tests.
|
||||||
* Other options:
|
* Other options:
|
||||||
|
|
Loading…
Add table
Reference in a new issue