Add some opendj internal attributes. Remove some unused variables in APIController
This commit is contained in:
parent
af7ca851d5
commit
a56b2d8002
@ -26,12 +26,15 @@ class Factory
|
|||||||
'entrycsn' => Internal\CSN::class,
|
'entrycsn' => Internal\CSN::class,
|
||||||
'entrydn' => Internal\DN::class,
|
'entrydn' => Internal\DN::class,
|
||||||
'entryuuid' => Internal\UUID::class,
|
'entryuuid' => Internal\UUID::class,
|
||||||
|
'etag' => Internal\Etag::class,
|
||||||
'gidnumber' => GidNumber::class,
|
'gidnumber' => GidNumber::class,
|
||||||
'hassubordinates' => Internal\HasSubordinates::class,
|
'hassubordinates' => Internal\HasSubordinates::class,
|
||||||
'jpegphoto' => Binary\JpegPhoto::class,
|
'jpegphoto' => Binary\JpegPhoto::class,
|
||||||
'modifytimestamp' => Internal\Timestamp::class,
|
'modifytimestamp' => Internal\Timestamp::class,
|
||||||
'modifiersname' => Internal\DN::class,
|
'modifiersname' => Internal\DN::class,
|
||||||
|
'numsubordinates' => Internal\NumSubordinates::class,
|
||||||
'objectclass' => ObjectClass::class,
|
'objectclass' => ObjectClass::class,
|
||||||
|
'pwdpolicysubentry' => Internal\PwdPolicySubentry::class,
|
||||||
'structuralobjectclass' => Internal\StructuralObjectClass::class,
|
'structuralobjectclass' => Internal\StructuralObjectClass::class,
|
||||||
'subschemasubentry' => Internal\SubschemaSubentry::class,
|
'subschemasubentry' => Internal\SubschemaSubentry::class,
|
||||||
'supportedcontrol' => Schema\OID::class,
|
'supportedcontrol' => Schema\OID::class,
|
||||||
|
12
app/Classes/LDAP/Attribute/Internal/Etag.php
Normal file
12
app/Classes/LDAP/Attribute/Internal/Etag.php
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Classes\LDAP\Attribute\Internal;
|
||||||
|
|
||||||
|
use App\Classes\LDAP\Attribute\Internal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Represents an Etag Attribute
|
||||||
|
*/
|
||||||
|
final class Etag extends Internal
|
||||||
|
{
|
||||||
|
}
|
12
app/Classes/LDAP/Attribute/Internal/NumSubordinates.php
Normal file
12
app/Classes/LDAP/Attribute/Internal/NumSubordinates.php
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Classes\LDAP\Attribute\Internal;
|
||||||
|
|
||||||
|
use App\Classes\LDAP\Attribute\Internal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Represents an NumSubordinates Attribute
|
||||||
|
*/
|
||||||
|
final class NumSubordinates extends Internal
|
||||||
|
{
|
||||||
|
}
|
12
app/Classes/LDAP/Attribute/Internal/PwdPolicySubentry.php
Normal file
12
app/Classes/LDAP/Attribute/Internal/PwdPolicySubentry.php
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Classes\LDAP\Attribute\Internal;
|
||||||
|
|
||||||
|
use App\Classes\LDAP\Attribute\Internal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Represents an PwdPolicySubentry Attribute
|
||||||
|
*/
|
||||||
|
final class PwdPolicySubentry extends Internal
|
||||||
|
{
|
||||||
|
}
|
@ -39,14 +39,13 @@ class APIController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function children(Request $request): Collection
|
public function children(Request $request): Collection
|
||||||
{
|
{
|
||||||
$levels = $request->query('depth',1);
|
|
||||||
$dn = Crypt::decryptString($request->query('key'));
|
$dn = Crypt::decryptString($request->query('key'));
|
||||||
|
|
||||||
// Sometimes our key has a command, so we'll ignore it
|
// Sometimes our key has a command, so we'll ignore it
|
||||||
if (str_starts_with($dn,'*') && ($x=strpos($dn,'|')))
|
if (str_starts_with($dn,'*') && ($x=strpos($dn,'|')))
|
||||||
$dn = substr($dn,$x+1);
|
$dn = substr($dn,$x+1);
|
||||||
|
|
||||||
Log::debug(sprintf('%s: Query [%s] - Levels [%d]',__METHOD__,$dn,$levels));
|
Log::debug(sprintf('%s: Query [%s]',__METHOD__,$dn));
|
||||||
|
|
||||||
return (config('server'))
|
return (config('server'))
|
||||||
->children($dn)
|
->children($dn)
|
||||||
@ -102,7 +101,7 @@ class APIController extends Controller
|
|||||||
* @param string $objectclass
|
* @param string $objectclass
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function schema_objectclass_attrs(Request $request,string $objectclass): array
|
public function schema_objectclass_attrs(string $objectclass): array
|
||||||
{
|
{
|
||||||
$oc = config('server')->schema('objectclasses',$objectclass);
|
$oc = config('server')->schema('objectclasses',$objectclass);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user