Compare commits
12 Commits
aa726db11a
...
0a268fb653
Author | SHA1 | Date | |
---|---|---|---|
0a268fb653 | |||
6954b09089 | |||
a336e58b7a | |||
53880121b6 | |||
ea46cf36d0 | |||
36f8f57b77 | |||
3604f1498c | |||
808934ebfe | |||
21a690c6dd | |||
0083e9158b | |||
f4cc559931 | |||
3de46ac28e |
@ -15,4 +15,4 @@ LDAP_HOST=
|
||||
LDAP_BASE_DN=
|
||||
LDAP_USERNAME=
|
||||
LDAP_PASSWORD=
|
||||
LDAP_CACHE=true
|
||||
LDAP_CACHE=false
|
||||
|
@ -61,7 +61,7 @@ Support is known for these LDAP servers:
|
||||
- [X] OpenLDAP
|
||||
- [X] OpenDJ
|
||||
- [ ] Microsoft Active Directory
|
||||
- [ ] 389 Directory Server
|
||||
- [X] 389 Directory Server
|
||||
|
||||
If there is an LDAP server that you have that you would like to have supported, please open an issue to request it.
|
||||
You might need to provide access, provide a copy or instructions to get an environment for testing. If you have enabled
|
||||
|
@ -311,7 +311,7 @@ class Attribute implements \Countable, \ArrayAccess
|
||||
*/
|
||||
public function render(bool $edit=FALSE,bool $old=FALSE,bool $new=FALSE): View
|
||||
{
|
||||
$view = match ($this->schema->syntax_oid) {
|
||||
$view = match ($this->schema?->syntax_oid) {
|
||||
self::SYNTAX_CERTIFICATE => view('components.syntax.certificate'),
|
||||
self::SYNTAX_CERTIFICATE_LIST => view('components.syntax.certificatelist'),
|
||||
|
||||
|
@ -20,7 +20,7 @@ abstract class Base {
|
||||
protected string $name = '';
|
||||
|
||||
// The OID of this schema item.
|
||||
protected string $oid;
|
||||
protected string $oid = '';
|
||||
|
||||
# The description of this schema item.
|
||||
protected string $description = '';
|
||||
|
@ -43,7 +43,7 @@ final class ObjectClass extends Base
|
||||
*
|
||||
* @param string $line Schema Line
|
||||
* @param Server $server
|
||||
* @todo Change $server to $connection, no need to store the server object here
|
||||
* @todo Deprecate this $server variable? It is only used for isForceMay() determination, and that might be better done elsewhere?
|
||||
*/
|
||||
public function __construct(string $line,Server $server)
|
||||
{
|
||||
|
@ -9,8 +9,10 @@ use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
use Illuminate\Support\Facades\Config;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Support\Facades\Session;
|
||||
use LdapRecord\LdapRecordException;
|
||||
use LdapRecord\Models\Model;
|
||||
use LdapRecord\Query\Builder;
|
||||
use LdapRecord\Query\Collection as LDAPCollection;
|
||||
use LdapRecord\Query\ObjectNotFoundException;
|
||||
|
||||
@ -20,8 +22,7 @@ use App\Ldap\Entry;
|
||||
|
||||
final class Server
|
||||
{
|
||||
// Connection information used for these object and children
|
||||
private ?string $connection;
|
||||
private const LOGKEY = 'SVR';
|
||||
|
||||
// This servers schema objectclasses
|
||||
private Collection $attributetypes;
|
||||
@ -35,22 +36,24 @@ final class Server
|
||||
public const OC_ABSTRACT = 0x02;
|
||||
public const OC_AUXILIARY = 0x03;
|
||||
|
||||
public function __construct(?string $connection=NULL)
|
||||
public function __construct()
|
||||
{
|
||||
$this->connection = $connection;
|
||||
$this->attributetypes = collect();
|
||||
$this->ldapsyntaxes = collect();
|
||||
$this->matchingrules = collect();
|
||||
$this->objectclasses = collect();
|
||||
}
|
||||
|
||||
public function __get(string $key): mixed
|
||||
{
|
||||
return match($key) {
|
||||
'attributetypes' => $this->attributetypes,
|
||||
'connection' => $this->connection,
|
||||
'ldapsyntaxes' => $this->ldapsyntaxes,
|
||||
'matchingrules' => $this->matchingrules,
|
||||
'objectclasses' => $this->objectclasses,
|
||||
'config' => config('ldap.connections.'.config('ldap.default')),
|
||||
'config' => config(sprintf('ldap.connections.%s',config('ldap.default'))),
|
||||
'name' => Arr::get($this->config,'name',__('No Server Name Yet')),
|
||||
default => throw new Exception('Unknown key:' . $key),
|
||||
default => throw new Exception('Unknown key:'.$key),
|
||||
};
|
||||
}
|
||||
|
||||
@ -60,20 +63,14 @@ final class Server
|
||||
* Gets the root DN of the specified LDAPServer, or throws an exception if it
|
||||
* can't find it.
|
||||
*
|
||||
* @param string|null $connection Return a collection of baseDNs
|
||||
* @param bool $objects Return a collection of Entry Models
|
||||
* @return Collection
|
||||
* @throws ObjectNotFoundException
|
||||
* @testedin GetBaseDNTest::testBaseDNExists();
|
||||
* @todo Need to allow for the scenario if the baseDN is not readable by ACLs
|
||||
*/
|
||||
public static function baseDNs(?string $connection=NULL,bool $objects=TRUE): Collection
|
||||
public static function baseDNs(bool $objects=FALSE): Collection
|
||||
{
|
||||
$cachetime = Carbon::now()
|
||||
->addSeconds(Config::get('ldap.cache.time'));
|
||||
|
||||
try {
|
||||
$base = self::rootDSE($connection,$cachetime);
|
||||
$rootdse = self::rootDSE();
|
||||
|
||||
/**
|
||||
* LDAP Error Codes:
|
||||
@ -179,57 +176,100 @@ final class Server
|
||||
}
|
||||
|
||||
if (! $objects)
|
||||
return collect($base->namingcontexts);
|
||||
return collect($rootdse->namingcontexts);
|
||||
|
||||
/**
|
||||
* @note While we are caching our baseDNs, it seems if we have more than 1,
|
||||
* our caching doesnt generate a hit on a subsequent call to this function (before the cache expires).
|
||||
* IE: If we have 5 baseDNs, it takes 5 calls to this function to cache them all.
|
||||
* @todo Possibly a bug with ldaprecord, so need to investigate
|
||||
*/
|
||||
$result = collect();
|
||||
foreach ($base->namingcontexts as $dn)
|
||||
$result->push((new Entry)->cache($cachetime)->findOrFail($dn));
|
||||
return Cache::remember('basedns'.Session::id(),config('ldap.cache.time'),function() use ($rootdse) {
|
||||
$result = collect();
|
||||
|
||||
return $result;
|
||||
// @note: Incase our rootDSE didnt return a namingcontext, we'll have no base DNs
|
||||
foreach (($rootdse->namingcontexts ?: []) as $dn)
|
||||
$result->push(self::get($dn)->read()->find($dn));
|
||||
|
||||
return $result->filter();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Work out if we should flush the cache when retrieving an entry
|
||||
*
|
||||
* @param string $dn
|
||||
* @return bool
|
||||
* @note: We dont need to flush the cache for internal LDAP attributes, as we dont change them
|
||||
*/
|
||||
private static function cacheflush(string $dn): bool
|
||||
{
|
||||
$cache = (! config('ldap.cache.enabled'))
|
||||
|| match (strtolower($dn)) {
|
||||
'','cn=schema','cn=subschema' => FALSE,
|
||||
default => TRUE,
|
||||
};
|
||||
|
||||
Log::debug(sprintf('%s:%s - %s',self::LOGKEY,$cache ? 'Caching' : 'Not Cached',$dn));
|
||||
return $cache;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return our cache time as per the configuration
|
||||
*
|
||||
* @return Carbon
|
||||
*/
|
||||
private static function cachetime(): Carbon
|
||||
{
|
||||
return Carbon::now()
|
||||
->addSeconds(Config::get('ldap.cache.time'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Generic Builder method to setup our queries consistently - mainly to ensure we cache results
|
||||
*
|
||||
* @param string $dn
|
||||
* @param array $attrs
|
||||
* @return Builder
|
||||
*/
|
||||
private static function get(string $dn,array $attrs=['*','+']): Builder
|
||||
{
|
||||
return Entry::query()
|
||||
->setDN($dn)
|
||||
->cache(
|
||||
until: self::cachetime(),
|
||||
flush: self::cacheflush($dn))
|
||||
->select($attrs);
|
||||
}
|
||||
|
||||
/**
|
||||
* Obtain the rootDSE for the server, that gives us server information
|
||||
*
|
||||
* @param string|null $connection
|
||||
* @param Carbon|null $cachetime
|
||||
* @return Entry|null
|
||||
* @return Model
|
||||
* @throws ObjectNotFoundException
|
||||
* @testedin TranslateOidTest::testRootDSE();
|
||||
* @note While we are using a static variable for in session performance, we'll also cache the result normally
|
||||
*/
|
||||
public static function rootDSE(?string $connection=NULL,?Carbon $cachetime=NULL): ?Model
|
||||
public static function rootDSE(): Model
|
||||
{
|
||||
$e = new Entry;
|
||||
static $rootdse = NULL;
|
||||
|
||||
return Entry::on($connection ?? $e->getConnectionName())
|
||||
->cache($cachetime)
|
||||
->in(NULL)
|
||||
->read()
|
||||
->select(['+'])
|
||||
->whereHas('objectclass')
|
||||
->firstOrFail();
|
||||
if (is_null($rootdse))
|
||||
$rootdse = self::get('',['+','*'])
|
||||
->read()
|
||||
->firstOrFail();
|
||||
|
||||
return $rootdse;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Schema DN
|
||||
*
|
||||
* @param string|null $connection
|
||||
* @return string
|
||||
* @throws ObjectNotFoundException
|
||||
*/
|
||||
public static function schemaDN(?string $connection=NULL): string
|
||||
public static function schemaDN(): string
|
||||
{
|
||||
$cachetime = Carbon::now()->addSeconds(Config::get('ldap.cache.time'));
|
||||
|
||||
return collect(self::rootDSE($connection,$cachetime)->subschemasubentry)->first();
|
||||
return collect(self::rootDSE()->subschemasubentry)
|
||||
->first();
|
||||
}
|
||||
|
||||
/* METHODS */
|
||||
|
||||
/**
|
||||
* Query the server for a DN and return its children and if those children have children.
|
||||
*
|
||||
@ -239,17 +279,16 @@ final class Server
|
||||
*/
|
||||
public function children(string $dn,array $attrs=['dn']): ?LDAPCollection
|
||||
{
|
||||
return ($x=(new Entry)
|
||||
->on($this->connection)
|
||||
->cache(Carbon::now()->addSeconds(Config::get('ldap.cache.time')))
|
||||
->select(array_merge($attrs,[
|
||||
'hassubordinates', // Needed for the tree to know if an entry has children
|
||||
'c' // Needed for the tree to show icons for countries
|
||||
]))
|
||||
->setDn($dn)
|
||||
return $this
|
||||
->get(
|
||||
dn: $dn,
|
||||
attrs: array_merge($attrs,[
|
||||
'hassubordinates', // Needed for the tree to know if an entry has children
|
||||
'c' // Needed for the tree to show icons for countries
|
||||
]))
|
||||
->list()
|
||||
->orderBy('dn')
|
||||
->get()) ? $x : NULL;
|
||||
->get() ?: NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -257,15 +296,13 @@ final class Server
|
||||
*
|
||||
* @param string $dn
|
||||
* @param array $attrs
|
||||
* @return Entry|null
|
||||
* @return Model|null
|
||||
*/
|
||||
public function fetch(string $dn,array $attrs=['*','+']): ?Entry
|
||||
public function fetch(string $dn,array $attrs=['*','+']): ?Model
|
||||
{
|
||||
return ($x=(new Entry)
|
||||
->on($this->connection)
|
||||
->cache(Carbon::now()->addSeconds(Config::get('ldap.cache.time')))
|
||||
->select($attrs)
|
||||
->find($dn)) ? $x : NULL;
|
||||
return $this->get($dn,$attrs)
|
||||
->read()
|
||||
->first() ?: NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -273,6 +310,7 @@ final class Server
|
||||
* as configured in config.php.
|
||||
*
|
||||
* @return boolean True if the specified attribute is configured to be force as a may attribute
|
||||
* @todo There are 3 isForceMay() functions - we only need one
|
||||
*/
|
||||
public function isForceMay($attr_name): bool
|
||||
{
|
||||
@ -309,34 +347,11 @@ final class Server
|
||||
// First pass if we have already retrieved the schema item
|
||||
switch ($item) {
|
||||
case 'attributetypes':
|
||||
if (isset($this->attributetypes))
|
||||
return $this->attributetypes;
|
||||
else
|
||||
$this->attributetypes = collect();
|
||||
|
||||
break;
|
||||
|
||||
case 'ldapsyntaxes':
|
||||
if (isset($this->ldapsyntaxes))
|
||||
return $this->ldapsyntaxes;
|
||||
else
|
||||
$this->ldapsyntaxes = collect();
|
||||
|
||||
break;
|
||||
|
||||
case 'matchingrules':
|
||||
if (isset($this->matchingrules))
|
||||
return $this->matchingrules;
|
||||
else
|
||||
$this->matchingrules = collect();
|
||||
|
||||
break;
|
||||
|
||||
case 'objectclasses':
|
||||
if (isset($this->objectclasses))
|
||||
return $this->objectclasses;
|
||||
else
|
||||
$this->objectclasses = collect();
|
||||
if ($this->{$item}->count())
|
||||
return $this->{$item};
|
||||
|
||||
break;
|
||||
|
||||
@ -346,8 +361,9 @@ final class Server
|
||||
}
|
||||
|
||||
// Try to get the schema DN from the specified entry.
|
||||
$schema_dn = $this->schemaDN($this->connection);
|
||||
$schema = $this->fetch($schema_dn);
|
||||
$schema_dn = $this->schemaDN();
|
||||
// @note: 389DS does not return subschemaSubentry unless it is requested
|
||||
$schema = $this->fetch($schema_dn,['*','+','subschemaSubentry']);
|
||||
|
||||
// If our schema's null, we didnt find it.
|
||||
if (! $schema)
|
||||
@ -355,7 +371,7 @@ final class Server
|
||||
|
||||
switch ($item) {
|
||||
case 'attributetypes':
|
||||
Log::debug('Attribute Types');
|
||||
Log::debug(sprintf('%s:Attribute Types',self::LOGKEY));
|
||||
// build the array of attribueTypes
|
||||
//$syntaxes = $this->SchemaSyntaxes($dn);
|
||||
|
||||
@ -373,7 +389,7 @@ final class Server
|
||||
* with its name set to the alias name, and all other data copied.*/
|
||||
|
||||
if ($o->aliases->count()) {
|
||||
Log::debug(sprintf('\ Attribute [%s] has the following aliases [%s]',$o->name,$o->aliases->join(',')));
|
||||
Log::debug(sprintf('%s:\ Attribute [%s] has the following aliases [%s]',self::LOGKEY,$o->name,$o->aliases->join(',')));
|
||||
|
||||
foreach ($o->aliases as $alias) {
|
||||
$new_attr = clone $o;
|
||||
@ -433,7 +449,7 @@ final class Server
|
||||
return $this->attributetypes;
|
||||
|
||||
case 'ldapsyntaxes':
|
||||
Log::debug('LDAP Syntaxes');
|
||||
Log::debug(sprintf('%s:LDAP Syntaxes',self::LOGKEY));
|
||||
|
||||
foreach ($schema->{$item} as $line) {
|
||||
if (is_null($line) || ! strlen($line))
|
||||
@ -446,7 +462,7 @@ final class Server
|
||||
return $this->ldapsyntaxes;
|
||||
|
||||
case 'matchingrules':
|
||||
Log::debug('Matching Rules');
|
||||
Log::debug(sprintf('%s:Matching Rules',self::LOGKEY));
|
||||
$this->matchingruleuse = collect();
|
||||
|
||||
foreach ($schema->{$item} as $line) {
|
||||
@ -487,7 +503,7 @@ final class Server
|
||||
return $this->matchingrules;
|
||||
|
||||
case 'objectclasses':
|
||||
Log::debug('Object Classes');
|
||||
Log::debug(sprintf('%s:Object Classes',self::LOGKEY));
|
||||
|
||||
foreach ($schema->{$item} as $line) {
|
||||
if (is_null($line) || ! strlen($line))
|
||||
|
@ -17,10 +17,11 @@ class AjaxController extends Controller
|
||||
*
|
||||
* @return Collection
|
||||
* @throws \LdapRecord\Query\ObjectNotFoundException
|
||||
* @todo This should be consolidated with HomeController
|
||||
*/
|
||||
public function bases(): Collection
|
||||
{
|
||||
$base = Server::baseDNs() ?: collect();
|
||||
$base = Server::baseDNs(TRUE) ?: collect();
|
||||
|
||||
return $base
|
||||
->transform(fn($item)=>
|
||||
|
@ -28,7 +28,7 @@ class HomeController extends Controller
|
||||
{
|
||||
private function bases(): Collection
|
||||
{
|
||||
$base = Server::baseDNs() ?: collect();
|
||||
$base = Server::baseDNs(TRUE) ?: collect();
|
||||
|
||||
return $base->transform(function($item) {
|
||||
return [
|
||||
@ -45,7 +45,7 @@ class HomeController extends Controller
|
||||
* Create a new object in the LDAP server
|
||||
*
|
||||
* @param EntryAddRequest $request
|
||||
* @return View
|
||||
* @return \Illuminate\View\View
|
||||
* @throws InvalidUsage
|
||||
*/
|
||||
public function entry_add(EntryAddRequest $request): \Illuminate\View\View
|
||||
@ -189,8 +189,7 @@ class HomeController extends Controller
|
||||
{
|
||||
$dn = Crypt::decryptString($id);
|
||||
|
||||
$result = (new Entry)
|
||||
->query()
|
||||
$result = Entry::query()
|
||||
->setDn($dn)
|
||||
->recursive()
|
||||
->get();
|
||||
|
@ -10,7 +10,7 @@ use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Support\Facades\Session;
|
||||
use LdapRecord\Container;
|
||||
|
||||
use App\Ldap\Connection;
|
||||
use App\Ldap\Guard;
|
||||
|
||||
class SwapinAuthUser
|
||||
{
|
||||
@ -37,7 +37,11 @@ class SwapinAuthUser
|
||||
}
|
||||
|
||||
// We need to override our Connection object so that we can store and retrieve the logged in user and swap out the credentials to use them.
|
||||
Container::getInstance()->addConnection(new Connection(config('ldap.connections.'.$key)),$key);
|
||||
$c = Container::getInstance()
|
||||
->getConnection($key);
|
||||
|
||||
$c->setConfiguration(config('ldap.connections.'.$key));
|
||||
$c->setGuardResolver(fn()=>new Guard($c->getLdapConnection(),$c->getConfiguration()));
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
|
@ -1,21 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Ldap;
|
||||
|
||||
use LdapRecord\Configuration\DomainConfiguration;
|
||||
use LdapRecord\Connection as ConnectionBase;
|
||||
use LdapRecord\LdapInterface;
|
||||
|
||||
class Connection extends ConnectionBase
|
||||
{
|
||||
|
||||
public function __construct(DomainConfiguration|array $config=[],?LdapInterface $ldap=NULL)
|
||||
{
|
||||
parent::__construct($config,$ldap);
|
||||
|
||||
// We need to override this so that we use our own Guard, that stores the users credentials in the session
|
||||
$this->authGuardResolver = function () {
|
||||
return new Guard($this->ldap, $this->configuration);
|
||||
};
|
||||
}
|
||||
}
|
@ -27,8 +27,6 @@ class Entry extends Model
|
||||
|
||||
// Our Attribute objects
|
||||
private Collection $objects;
|
||||
/* @deprecated */
|
||||
private bool $noObjectAttributes = FALSE;
|
||||
// For new entries, this is the container that this entry will be stored in
|
||||
private string $rdnbase;
|
||||
|
||||
@ -71,8 +69,6 @@ class Entry extends Model
|
||||
|
||||
/**
|
||||
* Determine if the new and old values for a given key are equivalent.
|
||||
*
|
||||
* @todo This function barfs on language tags, eg: key = givenname;lang-ja
|
||||
*/
|
||||
protected function originalIsEquivalent(string $key): bool
|
||||
{
|
||||
@ -84,16 +80,6 @@ class Entry extends Model
|
||||
|| (! $this->getObject($attribute)->isDirty());
|
||||
}
|
||||
|
||||
public static function query(bool $noattrs=false): Builder
|
||||
{
|
||||
$o = new static;
|
||||
|
||||
if ($noattrs)
|
||||
$o->noObjectAttributes();
|
||||
|
||||
return $o->newQuery();
|
||||
}
|
||||
|
||||
/**
|
||||
* As attribute values are updated, or new ones created, we need to mirror that
|
||||
* into our $objects. This is called when we $o->key = $value
|
||||
@ -539,19 +525,6 @@ class Entry extends Model
|
||||
return [$attribute,$tags];
|
||||
}
|
||||
|
||||
/**
|
||||
* Dont convert our $this->attributes to $this->objects when creating a new Entry::class
|
||||
*
|
||||
* @return $this
|
||||
* @deprecated
|
||||
*/
|
||||
public function noObjectAttributes(): static
|
||||
{
|
||||
$this->noObjectAttributes = TRUE;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setRDNBase(string $bdn): void
|
||||
{
|
||||
if ($this->exists)
|
||||
|
@ -31,7 +31,7 @@ class LdapUserRepository extends LdapUserRepositoryBase
|
||||
return $this->query()->find($credentials['dn']);
|
||||
|
||||
// Look for a user using all our baseDNs
|
||||
foreach (Server::baseDNs() as $base) {
|
||||
foreach (Server::baseDNs(FALSE) as $base) {
|
||||
$query = $this->query()->setBaseDn($base);
|
||||
|
||||
foreach ($credentials as $key => $value) {
|
||||
@ -67,7 +67,7 @@ class LdapUserRepository extends LdapUserRepositoryBase
|
||||
public function findByGuid($guid): ?Model
|
||||
{
|
||||
// Look for a user using all our baseDNs
|
||||
foreach (Server::baseDNs() as $base) {
|
||||
foreach (Server::baseDNs(FALSE) as $base) {
|
||||
$user = $this->query()->setBaseDn($base)->findByGuid($guid);
|
||||
|
||||
if ($user)
|
||||
|
5
public/css/fixes.css
vendored
5
public/css/fixes.css
vendored
@ -252,4 +252,9 @@ select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__
|
||||
/* Stop showing a border on our user's drop down menu when open */
|
||||
.btn-check:checked+.btn, .btn.active, .btn.show, .btn:first-child:active, :not(.btn-check)+.btn:active {
|
||||
border-color: var(--bs-btn-bg);
|
||||
}
|
||||
|
||||
/* limit selection to inside the modal */
|
||||
body.modal-open {
|
||||
user-select: none;
|
||||
}
|
@ -24,7 +24,7 @@
|
||||
<td>BaseDN(s)</td>
|
||||
<td>
|
||||
<table class="table table-sm table-borderless">
|
||||
@foreach($server->baseDNs()->sort(fn($item)=>$item->sort_key) as $item)
|
||||
@foreach($server->baseDNs(TRUE)->sort(fn($item)=>$item->sort_key) as $item)
|
||||
<tr>
|
||||
<td class="ps-0">{{ $item->getDn() }}</td>
|
||||
</tr>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<td class="p-1 pt-0" rowspan="2">
|
||||
{!! ($x=$o->getObject('jpegphoto')) ? $x->render(FALSE,TRUE) : sprintf('<div class="page-title-icon f32 m-2"><i class="%s"></i></div>',$o->icon() ?? "fas fa-info") !!}
|
||||
</td>
|
||||
<td class="text-end align-bottom pb-0 mb-0 pt-2 pe-3 {{ $x ? 'ps-3' : '' }}"><strong>{{ $o->getDn() }}</strong></td>
|
||||
<td class="text-end align-bottom pb-0 mb-0 pt-2 pe-3 {{ $x ? 'ps-3' : '' }}"><strong class="user-select-all">{{ $o->getDn() }}</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="align-bottom" style="font-size: 55%" colspan="2">
|
||||
|
@ -336,6 +336,11 @@
|
||||
}
|
||||
});
|
||||
|
||||
$('#page-modal').on('hide.bs.modal',function() {
|
||||
// Clear any select ranges that occurred while the modal was open
|
||||
document.getSelection().removeAllRanges();
|
||||
});
|
||||
|
||||
@if(old())
|
||||
editmode();
|
||||
@endif
|
||||
|
@ -1,11 +1,10 @@
|
||||
@use(App\Classes\LDAP\Server)
|
||||
@extends('layouts.dn')
|
||||
|
||||
@section('page_title')
|
||||
<table class="table table-borderless">
|
||||
<tr>
|
||||
<td style="border-radius: 5px;"><div class="page-title-icon f32"><i class="fas fa-fingerprint"></i></div></td>
|
||||
<td class="top text-end align-text-top p-2"><strong>{{ Server::schemaDN() }}</strong></td>
|
||||
<td class="top text-end align-text-top p-2"><strong>{{ $server->schemaDN() }}</strong></td>
|
||||
</tr>
|
||||
</table>
|
||||
@endsection
|
||||
|
@ -5,7 +5,7 @@
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<div id="entry_export"></div>
|
||||
<div id="entry_export" style="user-select: text;"></div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
|
@ -12,7 +12,7 @@ class ExampleTest extends TestCase
|
||||
*/
|
||||
public function test_the_application_returns_a_successful_response(): void
|
||||
{
|
||||
$response = $this->get('/');
|
||||
$response = $this->get('/login');
|
||||
|
||||
$response->assertStatus(200);
|
||||
}
|
||||
|
@ -13,11 +13,10 @@ class GetBaseDNTest extends TestCase
|
||||
*
|
||||
* @return void
|
||||
* @throws \LdapRecord\Query\ObjectNotFoundException
|
||||
* @covers \App\Classes\LDAP\Server::baseDNs()
|
||||
*/
|
||||
public function testBaseDnExists()
|
||||
{
|
||||
$o = Server::baseDNs();
|
||||
$o = Server::baseDNs(TRUE);
|
||||
|
||||
$this->assertIsObject($o);
|
||||
$this->assertCount(6,$o->toArray());
|
||||
|
Loading…
x
Reference in New Issue
Block a user