Compare commits
5 Commits
f0a4bcf941
...
460e4762d8
Author | SHA1 | Date | |
---|---|---|---|
460e4762d8 | |||
f41b484dc4 | |||
855d7ae75c | |||
ffa8cdc826 | |||
8f39603f9f |
@ -253,10 +253,9 @@ class Attribute implements \Countable, \ArrayAccess
|
|||||||
*/
|
*/
|
||||||
public function isDirty(): bool
|
public function isDirty(): bool
|
||||||
{
|
{
|
||||||
return (($a=$this->values_old->dot())->keys()->count() !== ($b=$this->values->dot())->keys()->count())
|
return (($a=$this->values_old->dot()->filter())->keys()->count() !== ($b=$this->values->dot()->filter())->keys()->count())
|
||||||
|| ($a->values()->count() !== $b->values()->count())
|
|| ($a->count() !== $b->count())
|
||||||
|| ($a->keys()->diff($b->keys())->count() !== 0)
|
|| ($a->diff($b)->count() !== 0);
|
||||||
|| ($a->values()->diff($b->values())->count() !== 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -236,7 +236,7 @@ class HomeController extends Controller
|
|||||||
$password = $o->getObject('userpassword');
|
$password = $o->getObject('userpassword');
|
||||||
|
|
||||||
$result = collect();
|
$result = collect();
|
||||||
foreach ($password as $key => $value) {
|
foreach ($password->values->dot() as $key => $value) {
|
||||||
$hash = $password->hash($value);
|
$hash = $password->hash($value);
|
||||||
$compare = Arr::get($request->password,$key);
|
$compare = Arr::get($request->password,$key);
|
||||||
//Log::debug(sprintf('comparing [%s] with [%s] type [%s]',$value,$compare,$hash::id()),['object'=>$hash]);
|
//Log::debug(sprintf('comparing [%s] with [%s] type [%s]',$value,$compare,$hash::id()),['object'=>$hash]);
|
||||||
@ -349,7 +349,7 @@ class HomeController extends Controller
|
|||||||
|
|
||||||
return Redirect::to('/')
|
return Redirect::to('/')
|
||||||
->withInput()
|
->withInput()
|
||||||
->with('updated',collect($dirty)->map(fn($key,$item)=>$o->getObject($item)));
|
->with('updated',collect($dirty)->map(fn($item,$key)=>$o->getObject(collect(explode(';',$key))->first())));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -376,7 +376,7 @@ class HomeController extends Controller
|
|||||||
// If we are rendering a DN, rebuild our object
|
// If we are rendering a DN, rebuild our object
|
||||||
$o = config('server')->fetch($key['dn']);
|
$o = config('server')->fetch($key['dn']);
|
||||||
|
|
||||||
foreach (collect(old())->except(['key','step','_token','userpassword_hash']) as $attr => $value)
|
foreach (collect(old())->except(['key','dn','step','_token','userpassword_hash']) as $attr => $value)
|
||||||
$o->{$attr} = $value;
|
$o->{$attr} = $value;
|
||||||
|
|
||||||
return match ($key['cmd']) {
|
return match ($key['cmd']) {
|
||||||
|
@ -1 +1 @@
|
|||||||
v2.0.3-rel
|
v2.1.0-dev
|
||||||
|
@ -17,19 +17,4 @@
|
|||||||
@yield('page_actions')
|
@yield('page_actions')
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@section('page-scripts')
|
|
||||||
<script type="text/javascript">
|
|
||||||
$(document).ready(function() {
|
|
||||||
$('button[id=entry-edit]').on('click',function(item) {
|
|
||||||
item.preventDefault();
|
|
||||||
|
|
||||||
if ($(this).hasClass('btn-dark'))
|
|
||||||
return;
|
|
||||||
|
|
||||||
editmode();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
@append
|
|
@ -5,7 +5,7 @@
|
|||||||
<p>{{ __('Entry updated') }}</p>
|
<p>{{ __('Entry updated') }}</p>
|
||||||
<ul style="list-style-type: square;">
|
<ul style="list-style-type: square;">
|
||||||
@foreach (session()->pull('updated') as $key => $o)
|
@foreach (session()->pull('updated') as $key => $o)
|
||||||
<li><abbr title="{{ $o->description }}">{{ $o->name }}</abbr>: {{ $o->values->map(fn($item,$key)=>$o->render_item_new($key))->join(',') }}</li>
|
<li><abbr title="{{ $o->description }}">{{ $o->name }}</abbr>: {{ $o->values->dot()->filter()->join(',') }}</li>
|
||||||
@endforeach
|
@endforeach
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
@ -210,6 +210,15 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
$('button[id=entry-edit]').on('click',function(item) {
|
||||||
|
item.preventDefault();
|
||||||
|
|
||||||
|
if ($(this).hasClass('btn-dark'))
|
||||||
|
return;
|
||||||
|
|
||||||
|
editmode();
|
||||||
|
});
|
||||||
|
|
||||||
$('#newattr').on('change',function(item) {
|
$('#newattr').on('change',function(item) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
|
@ -7,12 +7,12 @@
|
|||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<table class="table table-bordered p-1">
|
<table class="table table-bordered p-1">
|
||||||
@foreach(($up=$o->getObject('userpassword'))->values as $key => $value)
|
@foreach(($up=$o->getObject('userpassword'))->values->dot() as $dotkey => $value)
|
||||||
<tr>
|
<tr>
|
||||||
<th>Check</th>
|
<th>Check</th>
|
||||||
<td>{{ $up->render_item_old($key) }}</td>
|
<td>{{ $up->render_item_old($dotkey) }}</td>
|
||||||
<td>
|
<td>
|
||||||
<input type="password" style="width: 90%" name="password[{{$key}}]"> <i class="fas fa-fw fa-lock"></i>
|
<input type="password" style="width: 90%" name="password[{{ $dotkey }}]"> <i class="fas fa-fw fa-lock"></i>
|
||||||
<div class="invalid-feedback pb-2">
|
<div class="invalid-feedback pb-2">
|
||||||
@lang('Invalid Password')
|
@lang('Invalid Password')
|
||||||
</div>
|
</div>
|
||||||
|
@ -50,8 +50,12 @@
|
|||||||
{{ $dotkey }}
|
{{ $dotkey }}
|
||||||
</th>
|
</th>
|
||||||
|
|
||||||
<td>{{ (($r=$oo->render_item_old($dotkey)) !== NULL) ? $r : '['.strtoupper(__('New Value')).']' }}</td>
|
@if((! Arr::get($oo->values_old->dot(),$dotkey)) && (! Arr::get($oo->values->dot(),$dotkey)))
|
||||||
<td>{{ (($r=$oo->render_item_new($dotkey)) !== NULL) ? $r : '['.strtoupper(__('Deleted')).']' }}<input type="hidden" name="{{ $key }}[{{ collect(explode('.',$dotkey))->first() }}][]" value="{{ Arr::get($oo,$dotkey) }}"></td>
|
<td colspan="2" class="text-center">@lang('Ignoring blank value')</td>
|
||||||
|
@else
|
||||||
|
<td>{{ (($r=$oo->render_item_old($dotkey)) !== NULL) ? $r : '['.strtoupper(__('New Value')).']' }}</td>
|
||||||
|
<td>{{ (($r=$oo->render_item_new($dotkey)) !== NULL) ? $r : '['.strtoupper(__('Deleted')).']' }}<input type="hidden" name="{{ $key }}[{{ collect(explode('.',$dotkey))->first() }}][]" value="{{ Arr::get($oo,$dotkey) }}"></td>
|
||||||
|
@endif
|
||||||
@endforeach
|
@endforeach
|
||||||
</tr>
|
</tr>
|
||||||
@endforeach
|
@endforeach
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
|
|
||||||
dn: cn=tech_staff,dc=example.com
|
dn: cn=tech_staff,dc=example.com
|
||||||
cn: tech_staff
|
cn: tech_staff
|
||||||
labeleduri: ldap:///ou=People,o=Simpsons?uid?one?(&(sn=Simpson)(|(uidNumber
|
labeleduri: ldap:///dc=example.com?uid?one?(|(cn=kerberos)(uidNumber=*))
|
||||||
=1000)(uidNumber=1001)))
|
|
||||||
objectclass: nisMailAlias
|
objectclass: nisMailAlias
|
||||||
objectclass: labeledURIObject
|
objectclass: labeledURIObject
|
||||||
|
7
tests/server/openldap/schema/modify/00-config.ldif
Normal file
7
tests/server/openldap/schema/modify/00-config.ldif
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
dn: olcDatabase={0}config,cn=config
|
||||||
|
changetype: modify
|
||||||
|
add: olcRootPW
|
||||||
|
olcRootPW:: c2VjcmV0
|
||||||
|
|
||||||
|
add: olcRootDN
|
||||||
|
olcRootDN: cn=config
|
25
tests/server/openldap/schema/modify/00-mapsize.ldif
Normal file
25
tests/server/openldap/schema/modify/00-mapsize.ldif
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
dn: olcDatabase={3}mdb,cn=config
|
||||||
|
changetype: modify
|
||||||
|
add: olcDbMaxSize
|
||||||
|
olcDbMaxSize: 1073741824
|
||||||
|
|
||||||
|
dn: olcDatabase={4}mdb,cn=config
|
||||||
|
changetype: modify
|
||||||
|
add: olcDbMaxSize
|
||||||
|
olcDbMaxSize: 1073741824
|
||||||
|
|
||||||
|
dn: olcDatabase={5}mdb,cn=config
|
||||||
|
changetype: modify
|
||||||
|
add: olcDbMaxSize
|
||||||
|
olcDbMaxSize: 1073741824
|
||||||
|
|
||||||
|
dn: olcDatabase={6}mdb,cn=config
|
||||||
|
changetype: modify
|
||||||
|
add: olcDbMaxSize
|
||||||
|
olcDbMaxSize: 1073741824
|
||||||
|
|
||||||
|
dn: olcDatabase={7}mdb,cn=config
|
||||||
|
changetype: modify
|
||||||
|
add: olcDbMaxSize
|
||||||
|
olcDbMaxSize: 1073741824
|
||||||
|
|
4
tests/server/openldap/schema/modify/00-sizelimit.ldif
Normal file
4
tests/server/openldap/schema/modify/00-sizelimit.ldif
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
dn: olcDatabase={4}mdb,cn=config
|
||||||
|
changetype: modify
|
||||||
|
add: olcSizeLimit
|
||||||
|
olcSizeLimit: 2000
|
11
tests/server/openldap/schema/modify/40-dynlist-options.ldif
Normal file
11
tests/server/openldap/schema/modify/40-dynlist-options.ldif
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
dn: olcOverlay=dynlist,olcDatabase={4}mdb,cn=config
|
||||||
|
changetype: add
|
||||||
|
objectClass: olcOverlayConfig
|
||||||
|
objectClass: olcDynListConfig
|
||||||
|
olcOverlay: dynlist
|
||||||
|
olcDynListAttrSet: nisMailAlias labeledURI
|
||||||
|
#olcDynListAttrSet: groupOfURLs memberURL memberOf
|
||||||
|
#olcDynListAttrSet: groupOfURLs memberURL member+dgMemberOf
|
||||||
|
#olcDynListAttrSet: groupOfURLs memberURL member
|
||||||
|
#olcDynListAttrSet: groupOfURLs memberURL member
|
||||||
|
#olcDynListAttrSet: groupOfURLs labeledURI member
|
Loading…
x
Reference in New Issue
Block a user