mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-12-18 22:43:47 +01:00
LSrelation : Add create button even if user can't edit the relation
This commit is contained in:
parent
486f33ccf9
commit
7970489489
1 changed files with 9 additions and 8 deletions
|
@ -254,12 +254,14 @@ class LSrelation {
|
||||||
'objectDn' => $object -> getDn(),
|
'objectDn' => $object -> getDn(),
|
||||||
);
|
);
|
||||||
$relation = new LSrelation($object, $relationName);
|
$relation = new LSrelation($object, $relationName);
|
||||||
|
|
||||||
if ($relation -> canEdit()) {
|
if ($relation -> canEdit()) {
|
||||||
$return['actions'][] = array(
|
$return['actions'][] = array(
|
||||||
'label' => _('Modify'),
|
'label' => _('Modify'),
|
||||||
'url' => 'select.php?LSobject='.$relationConf['LSobject'].'&multiple=1'.($relation -> getRelatedEditableAttribute()?'&editableAttr='.$relation -> getRelatedEditableAttribute():''),
|
'url' => 'select.php?LSobject='.$relationConf['LSobject'].'&multiple=1'.($relation -> getRelatedEditableAttribute()?'&editableAttr='.$relation -> getRelatedEditableAttribute():''),
|
||||||
'action' => 'modify'
|
'action' => 'modify'
|
||||||
);
|
);
|
||||||
|
}
|
||||||
if ($relation -> canCreate()) {
|
if ($relation -> canCreate()) {
|
||||||
$return['actions'][] = array(
|
$return['actions'][] = array(
|
||||||
'label' => _('New'),
|
'label' => _('New'),
|
||||||
|
@ -267,7 +269,6 @@ class LSrelation {
|
||||||
'action' => 'create'
|
'action' => 'create'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
$list = $relation -> listRelatedObjects();
|
$list = $relation -> listRelatedObjects();
|
||||||
if (is_array($list)) {
|
if (is_array($list)) {
|
||||||
|
|
Loading…
Reference in a new issue