Deon George
ef355e8193
Now logins are allowed by any objectclass unless LDAP_LOGIN_OBJECTCLASS is defined, we should be an array of allowed objectClass (any match). Improvement for #245
29 lines
523 B
PHP
29 lines
523 B
PHP
<?php
|
|
|
|
namespace App\Ldap;
|
|
|
|
use Laravel\Passport\HasApiTokens;
|
|
use LdapRecord\Models\OpenLDAP\User as Model;
|
|
|
|
use App\Ldap\Rules\LoginObjectclassRule;
|
|
|
|
class User extends Model
|
|
{
|
|
use HasApiTokens;
|
|
|
|
/**
|
|
* The object classes of the LDAP model.
|
|
*
|
|
* @note We set this to an empty array so that any objectclass can login
|
|
* @see LoginObjectclassRule::class
|
|
*/
|
|
public static array $objectClasses = [
|
|
];
|
|
|
|
/* METHODS */
|
|
|
|
public function getDn(): string
|
|
{
|
|
return $this->exists ? parent::getDn() : 'Anonymous';
|
|
}
|
|
} |