Merge branch 'develop' of github.com:firefly-iii/firefly-iii into develop

This commit is contained in:
James Cole
2020-08-26 18:06:24 +02:00
2 changed files with 40 additions and 1 deletions

View File

@@ -0,0 +1,21 @@
<?php
namespace FireflyIII\Scopes;
use Adldap\Query\Builder;
use Adldap\Laravel\Scopes\ScopeInterface;
class LdapFilterScope implements ScopeInterface {
/**
* If the ADLDAP_AUTH_FILTER is provided, apply the filter to the LDAP query.
* @param Builder $query
* @return void
*/
public function apply(Builder $query)
{
$filter = (string) config('ldap_auth.custom_filter');
if ( '' !== $filter ) {
$query->rawFilter($filter);
}
}
}