Compare commits
3 Commits
77e6988f6a
...
028d6bb68f
Author | SHA1 | Date | |
---|---|---|---|
028d6bb68f | |||
715fe92da4 | |||
d90bc32887 |
@ -64,8 +64,8 @@ class Attribute implements \Countable, \ArrayAccess
|
|||||||
$soc = config('server')->schema('objectclasses',$objectclass);
|
$soc = config('server')->schema('objectclasses',$objectclass);
|
||||||
|
|
||||||
if ($soc) {
|
if ($soc) {
|
||||||
$this->oc->push($soc->oid);
|
$this->oc->push($soc->name);
|
||||||
$this->oc = $this->oc->merge($soc->getParents()->pluck('oid'));
|
$this->oc = $this->oc->merge($soc->getParents()->pluck('name'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -463,11 +463,11 @@ final class Server
|
|||||||
foreach ($o->attributes as $attribute) {
|
foreach ($o->attributes as $attribute) {
|
||||||
if (($attrid = $this->schema('attributetypes')->search(fn($item)=>$item->oid === $attribute->oid)) !== FALSE) {
|
if (($attrid = $this->schema('attributetypes')->search(fn($item)=>$item->oid === $attribute->oid)) !== FALSE) {
|
||||||
// Add Used In.
|
// Add Used In.
|
||||||
$this->attributetypes[$attrid]->addUsedInObjectClass($o->oid,$o->isStructural());
|
$this->attributetypes[$attrid]->addUsedInObjectClass($o->name,$o->isStructural());
|
||||||
|
|
||||||
// Add Required By.
|
// Add Required By.
|
||||||
if ($attribute->is_must)
|
if ($attribute->is_must)
|
||||||
$this->attributetypes[$attrid]->addRequiredByObjectClass($o->oid,$o->isStructural());
|
$this->attributetypes[$attrid]->addRequiredByObjectClass($o->name,$o->isStructural());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -415,6 +415,7 @@ class Template
|
|||||||
preg_match_all('/(\d+)/',trim($match_subst),$substrarray);
|
preg_match_all('/(\d+)/',trim($match_subst),$substrarray);
|
||||||
|
|
||||||
$delimiter = ($match_delim === '') ? ' ' : preg_quote($match_delim);
|
$delimiter = ($match_delim === '') ? ' ' : preg_quote($match_delim);
|
||||||
|
$result .= sprintf("%s = get_attribute('%s');\n",$match_attr,$match_attr);
|
||||||
$result .= sprintf(" %s = %s.split('%s')[%s];\n",$match_attr,$match_attr,$delimiter,$substrarray[1][0] ?? '0');
|
$result .= sprintf(" %s = %s.split('%s')[%s];\n",$match_attr,$match_attr,$delimiter,$substrarray[1][0] ?? '0');
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
@ -88,11 +88,11 @@
|
|||||||
<td>@lang('Used by ObjectClasses')</td>
|
<td>@lang('Used by ObjectClasses')</td>
|
||||||
<td>
|
<td>
|
||||||
@if($o->used_in_object_classes->count())
|
@if($o->used_in_object_classes->count())
|
||||||
@foreach($o->used_in_object_classes as $class => $structural)
|
@foreach($o->used_in_object_classes as $name => $structural)
|
||||||
@if($structural)
|
@if($structural)
|
||||||
<strong>
|
<strong>
|
||||||
@endif
|
@endif
|
||||||
<a class="objectclass" id="{{ strtolower($class) }}" href="#{{ strtolower($class) }}">{{ $class }}</a>
|
<a class="objectclass" id="{{ strtolower($name) }}" href="#{{ strtolower($name) }}">{{ $name }}</a>
|
||||||
@if($structural)
|
@if($structural)
|
||||||
</strong>
|
</strong>
|
||||||
@endif
|
@endif
|
||||||
|
48
templates/mail_account.json
Normal file
48
templates/mail_account.json
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
{
|
||||||
|
"title": "Generic: Mail Account",
|
||||||
|
"description": "New Mail Account",
|
||||||
|
"enabled": true,
|
||||||
|
"icon": "fa-at",
|
||||||
|
"rdn": "cn",
|
||||||
|
"regexp": "/^ou=.+,?/",
|
||||||
|
|
||||||
|
"objectclasses": [
|
||||||
|
"inetOrgPerson"
|
||||||
|
],
|
||||||
|
|
||||||
|
"attributes": {
|
||||||
|
"mail": {
|
||||||
|
"display": "Email (mail)",
|
||||||
|
"order": 1,
|
||||||
|
"onchange": [
|
||||||
|
"=autoFill(cn;%mail|0-0/k|@%)",
|
||||||
|
"=autoFill(description;%mail|1-0/k|@%)"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"givenName": {
|
||||||
|
"display": "First Name",
|
||||||
|
"onchange": [
|
||||||
|
"=autoFill(cn;%givenName% %sn/U%)",
|
||||||
|
"=autoFill(uid;%givenName|0-1/l%%sn/l%)"
|
||||||
|
],
|
||||||
|
"order": 3
|
||||||
|
},
|
||||||
|
"sn": {
|
||||||
|
"display": "Last Name",
|
||||||
|
"onchange": [
|
||||||
|
"=autoFill(cn;%givenName% %sn/U%)",
|
||||||
|
"=autoFill(uid;%givenName|0-1/l%%sn/l%)"
|
||||||
|
],
|
||||||
|
"order": 4
|
||||||
|
},
|
||||||
|
"cn": {
|
||||||
|
"display": "Common Name",
|
||||||
|
"readonly": true,
|
||||||
|
"order": 2
|
||||||
|
},
|
||||||
|
"description": {
|
||||||
|
"display": "Description",
|
||||||
|
"order": 5
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user