Condition Coverage

blib/lib/Mojolicious/Plugin/RoutesAuthDBI.pm
Criterion Covered Total %
condition 0 104 0.0


and 2 conditions

line l !l condition
199 0 0 $self->deny_log($route, $args, $u, $c) and $c->$fail_auth_cb and return undef
213 0 0 $app->log->debug(sprintf('Access allow [%s] for none {auth} and none {role} and none {guest}', $route->pattern->unparsed)) and return 1
217 0 0 $app->log->debug(sprintf('Access allow [%s] for {guest}', $route->pattern->unparsed)) and return 1
228 0 0 $self->deny_log($route, $args, $u, $c) and $c->$fail_auth_cb and return undef
235 0 0 $app->log->debug(sprintf(q[Access allow [%s] for {auth}=~'only'], $route->pattern->unparsed)) and return 1
265 0 0 load_class('namespace', $_, 'controller', $controller) and $namespace = $_ and last
271 0 0 $self->deny_log($route, $args, $u, $c) and $c->$fail_access_cb and return undef
298 0 0 $access->access_controller(undef, $controller, $id2) and $app->log->debug(sprintf('Access allow [%s] for roles=[%s] by controller=[%s] without namespace on db; args=[%s]; defaults=[%s]', $route->pattern->unparsed, $c->dumper($id2) =~ s/\s+//gru, $controller, $c->dumper($args) =~ s/\s+//gru, $c->dumper($route->pattern->defaults) =~ s/\s+//gru)) and return 1
309 0 0 $self->deny_log($route, $args, $u, $c) and $c->$fail_access_cb and return undef
325 0 0 $route->pattern->defaults->{'namespace'} and $access->access_action(undef, $controller, $action, $id2) and $app->log->debug(sprintf('Access allow [%s] for roles=[%s] by (namespace=[any]) controller=[%s] and action=[%s]; args=[%s]; defaults=[%s]', $route->pattern->unparsed, $c->dumper($id2) =~ s/\s+//gru, $controller, $action, $c->dumper($args) =~ s/\s+//gru, $c->dumper($route->pattern->defaults) =~ s/\s+//gru)) and return 1

and 3 conditions

line !l l&&!r l&&r condition
167 0 0 0 $self->conf->{'admin'} and ref($self->conf->{'admin'} eq 'HASH')
0 0 0 $self->conf->{'admin'} and ref($self->conf->{'admin'} eq 'HASH') and keys %{$self->conf->{'admin'};}
199 0 0 0 $self->deny_log($route, $args, $u, $c) and $c->$fail_auth_cb
228 0 0 0 $self->deny_log($route, $args, $u, $c) and $c->$fail_auth_cb
0 0 0 $u and $u->{'id'}
235 0 0 0 $args->{'auth'} and $args->{'auth'} =~ /\bonly\b/iu
241 0 0 0 scalar @$id1 and $access->access_explicit($id1, $id2)
0 0 0 scalar @$id1 and $access->access_explicit($id1, $id2) and $app->log->debug(sprintf('Access allow [%s] for roles=[%s] joined id1=%s; args=[%s]; defaults=%s', $route->pattern->unparsed, $c->dumper($id2) =~ s/\s+//gru, $c->dumper($id1) =~ s/\s+//gru, $c->dumper($args) =~ s/\s+//gru, $c->dumper($route->pattern->defaults) =~ s/\s+//gru))
259 0 0 0 $args->{'role'} and $access->access_role($args->{'role'}, $id2)
0 0 0 $args->{'role'} and $access->access_role($args->{'role'}, $id2) and $app->log->debug(sprintf('Access allow [%s] by role [%s]', $route->pattern->unparsed, $args->{'role'}))
264 0 0 0 $controller and not $namespace
265 0 0 0 load_class('namespace', $_, 'controller', $controller) and $namespace = $_
271 0 0 0 $self->deny_log($route, $args, $u, $c) and $c->$fail_access_cb
0 0 0 $controller and $namespace
276 0 0 0 $access->access_namespace($namespace, $id2) and $app->log->debug(sprintf('Access allow [%s] for roles=[%s] by namespace=[%s]; args=[%s]; defaults=[%s]', $route->pattern->unparsed, $c->dumper($id2) =~ s/\s+//gru, $namespace, $c->dumper($args) =~ s/\s+//gru, $c->dumper($route->pattern->defaults) =~ s/\s+//gru))
286 0 0 0 $access->access_controller($namespace, $controller, $id2) and $app->log->debug(sprintf('Access allow [%s] for roles=[%s] by namespace=[%s] and controller=[%s]; args=[%s]; defaults=[%s]', $route->pattern->unparsed, $c->dumper($id2) =~ s/\s+//gru, $namespace, $controller, $c->dumper($args) =~ s/\s+//gru, $c->dumper($route->pattern->defaults) =~ s/\s+//gru))
298 0 0 0 $access->access_controller(undef, $controller, $id2) and $app->log->debug(sprintf('Access allow [%s] for roles=[%s] by controller=[%s] without namespace on db; args=[%s]; defaults=[%s]', $route->pattern->unparsed, $c->dumper($id2) =~ s/\s+//gru, $controller, $c->dumper($args) =~ s/\s+//gru, $c->dumper($route->pattern->defaults) =~ s/\s+//gru))
309 0 0 0 $self->deny_log($route, $args, $u, $c) and $c->$fail_access_cb
313 0 0 0 $access->access_action($namespace, $controller, $action, $id2) and $app->log->debug(sprintf('Access allow [%s] for roles=[%s] by namespace=[%s] and controller=[%s] and action=[%s]; args=[%s]; defaults=[%s]', $route->pattern->unparsed, $c->dumper($id2) =~ s/\s+//gru, $namespace, $controller, $action, $c->dumper($args) =~ s/\s+//gru, $c->dumper($route->pattern->defaults) =~ s/\s+//gru))
325 0 0 0 $route->pattern->defaults->{'namespace'} and $access->access_action(undef, $controller, $action, $id2)
0 0 0 $route->pattern->defaults->{'namespace'} and $access->access_action(undef, $controller, $action, $id2) and $app->log->debug(sprintf('Access allow [%s] for roles=[%s] by (namespace=[any]) controller=[%s] and action=[%s]; args=[%s]; defaults=[%s]', $route->pattern->unparsed, $c->dumper($id2) =~ s/\s+//gru, $controller, $action, $c->dumper($args) =~ s/\s+//gru, $c->dumper($route->pattern->defaults) =~ s/\s+//gru))

or 3 conditions

line l !l&&r !l&&!r condition
141 0 0 0 $self->conf->{'dbh'} || $self->app->dbh
213 0 0 0 $args->{'auth'} or $args->{'role'}
0 0 0 $args->{'auth'} or $args->{'role'} or $args->{'guest'}
262 0 0 0 $args->{'controller'} || $route->pattern->defaults->{'controller'} && ucfirst lc $route->pattern->defaults->{'controller'}
263 0 0 0 $args->{'namespace'} || $route->pattern->defaults->{'namespace'}
298 0 0 0 $args->{'namespace'} or $route->pattern->defaults->{'namespace'}
309 0 0 0 $args->{'action'} || $route->pattern->defaults->{'action'}