Branch Coverage

blib/lib/Mojolicious/Plugin/RoutesAuthDBI.pm
Criterion Covered Total %
branch 0 52 0.0


line true false branch
141 0 0 if ref $self->dbh eq 'CODE'
143 0 0 unless $self->dbh
151 0 0 if $self->app->renderer->helpers->{'authenticate'}
161 0 0 if ($self->conf->{'oauth'})
166 0 0 if ($self->conf->{'admin'} and ref $self->conf->{'admin'} eq 'HASH' and keys %{$self->conf->{'admin'};})
172 0 0 if $self->conf->{'guest'}
175 0 0 if $self->conf->{'log'}
197 0 0 if (ref $args eq 'CODE')
198 0 0 unless &$args($u, @_)
212 0 0 unless $args->{'auth'} or $args->{'role'} or $args->{'guest'}
215 0 0 if ($args->{'guest'})
216 0 0 if $self->guest->is_guest($c)
227 0 0 unless $u and $u->{'id'}
234 0 0 if $args->{'auth'} and $args->{'auth'} =~ /\bonly\b/iu
240 0 0 if 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))
258 0 0 if $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'}))
263 0 0 if ($controller and not $namespace)
270 0 0 unless $controller and $namespace
275 0 0 if $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))
285 0 0 if $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))
297 0 0 unless $args->{'namespace'} or $route->pattern->defaults->{'namespace'}
308 0 0 unless my $action = $args->{'action'} || $route->pattern->defaults->{'action'}
312 0 0 if $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))
324 0 0 unless $args->{'namespace'}
345 0 0 $u ? :
354 0 0 unless my $class = load_class('namespace', $ns, 'module', $name)