Compare commits
2 Commits
1e9e140725
...
4209f95231
Author | SHA1 | Date | |
---|---|---|---|
4209f95231 | |||
696d87d190 |
@ -557,10 +557,13 @@ final class AttributeType extends Base {
|
||||
->unique();
|
||||
|
||||
$validation = collect(Arr::get(config('ldap.validation'),$this->name_lc,[]));
|
||||
|
||||
// Add in schema required by conditions
|
||||
if (($heirachy->intersect($this->required_by_object_classes->keys())->count() > 0)
|
||||
&& (! collect($validation->get($this->name_lc))->contains('required'))) {
|
||||
$validation->put($this->name_lc,array_merge(['required','min:1'],$validation->get($this->name_lc,[])))
|
||||
->put($this->name_lc.'.*',array_merge(['required','min:1'],$validation->get($this->name_lc.'.*',[])));
|
||||
$validation
|
||||
->prepend(array_merge(['required','min:1'],$validation->get($this->name_lc.'.0',[])),$this->name_lc.'.0')
|
||||
->prepend(array_merge(['required','array','min:1'],$validation->get($this->name_lc,[])),$this->name_lc);
|
||||
}
|
||||
|
||||
return $validation->toArray();
|
||||
|
@ -123,16 +123,12 @@ return [
|
||||
'validation' => [
|
||||
'objectclass' => [
|
||||
'objectclass'=>[
|
||||
'required',
|
||||
'array',
|
||||
'min:1',
|
||||
new HasStructuralObjectClass,
|
||||
]
|
||||
],
|
||||
'gidnumber' => [
|
||||
'gidnumber'=> [
|
||||
'sometimes',
|
||||
'array',
|
||||
'max:1'
|
||||
],
|
||||
'gidnumber.*' => [
|
||||
@ -144,7 +140,6 @@ return [
|
||||
'mail' => [
|
||||
'mail'=>[
|
||||
'sometimes',
|
||||
'array',
|
||||
'min:1'
|
||||
],
|
||||
'mail.*' => [
|
||||
@ -155,7 +150,6 @@ return [
|
||||
'userpassword' => [
|
||||
'userpassword' => [
|
||||
'sometimes',
|
||||
'array',
|
||||
'min:1'
|
||||
],
|
||||
'userpassword.*' => [
|
||||
@ -166,7 +160,6 @@ return [
|
||||
'uidnumber' => [
|
||||
'uidnumber' => [
|
||||
'sometimes',
|
||||
'array',
|
||||
'max:1'
|
||||
],
|
||||
'uidnumber.*' => [
|
||||
|
@ -1 +1 @@
|
||||
v2.0.2-rel
|
||||
v2.0.3-dev
|
||||
|
Loading…
x
Reference in New Issue
Block a user