Commit 39458184 authored by Francesc Guasch's avatar Francesc Guasch
Browse files

wip(auth): fixed edge case with no access entries

issue #916
parent 51e1e7dd
......@@ -734,7 +734,7 @@ get '/list_ldap_access/(#id_domain)' => sub {
my @ldap_access = $domain->list_ldap_access();
my $default = {};
if ($ldap_access[-1]->{value} eq '*') {
if (scalar @ldap_access && $ldap_access[-1]->{value} eq '*') {
$default = pop @ldap_access;
}
return $c->render(json => {list => \@ldap_access, default => $default} );
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment