Move PLA configurable items to config/pla.php
All checks were successful
Create Docker Image / Test Application (x86_64) (push) Successful in 36s
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 1m22s
Create Docker Image / Build Docker Image (arm64) (push) Successful in 3m30s
Create Docker Image / Final Docker Image Manifest (push) Successful in 10s
All checks were successful
Create Docker Image / Test Application (x86_64) (push) Successful in 36s
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 1m22s
Create Docker Image / Build Docker Image (arm64) (push) Successful in 3m30s
Create Docker Image / Final Docker Image Manifest (push) Successful in 10s
This commit is contained in:
@@ -197,7 +197,7 @@ class Entry extends Model
|
||||
}
|
||||
}
|
||||
|
||||
$sort = collect(config('ldap.attr_display_order',[]))->map(fn($item)=>strtolower($item));
|
||||
$sort = collect(config('pla.attr_display_order',[]))->map(fn($item)=>strtolower($item));
|
||||
|
||||
// Order the attributes
|
||||
return $result->sortBy([function(Attribute $a,Attribute $b) use ($sort): int {
|
||||
@@ -215,7 +215,7 @@ class Entry extends Model
|
||||
if ($b_key === FALSE)
|
||||
$b_key = $sort->count()+1;
|
||||
|
||||
// Case where neither $a, nor $b are in ldap.attr_display_order, $a_key = $b_key = one greater than num elements.
|
||||
// Case where neither $a, nor $b are in pla.attr_display_order, $a_key = $b_key = one greater than num elements.
|
||||
// So we sort them alphabetically
|
||||
if ($a_key === $b_key)
|
||||
return strcasecmp($a->name,$b->name);
|
||||
|
@@ -16,7 +16,7 @@ class LoginObjectclassRule implements Rule
|
||||
{
|
||||
public function passes(LdapRecord $user, Eloquent $model = null): bool
|
||||
{
|
||||
if ($x=config('ldap.login.objectclass')) {
|
||||
if ($x=config('pla.login.objectclass')) {
|
||||
return count(array_intersect($user->objectclass,$x));
|
||||
|
||||
// Otherwise allow the user to login
|
||||
|
@@ -4,12 +4,12 @@ use Illuminate\Support\Arr;
|
||||
|
||||
function login_attr_description(): string
|
||||
{
|
||||
return Arr::get(config('ldap.login.attr'),login_attr_name());
|
||||
return Arr::get(config('pla.login.attr'),login_attr_name());
|
||||
}
|
||||
|
||||
function login_attr_name(): string
|
||||
{
|
||||
return key(config('ldap.login.attr'));
|
||||
return key(config('pla.login.attr'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user