# HG changeset patch # User cin # Date 1400163868 -14400 # Node ID 16ff604298c7e7a15b2d07beb751e4a1d82cb778 # Parent ef37ec102dab7ae7a05e4fd35b2ef9756a491552 minor fixes diff -r ef37ec102dab -r 16ff604298c7 Lib/IMPL/Security/AbstractPrincipal.pm --- a/Lib/IMPL/Security/AbstractPrincipal.pm Wed May 14 17:27:32 2014 +0400 +++ b/Lib/IMPL/Security/AbstractPrincipal.pm Thu May 15 18:24:28 2014 +0400 @@ -10,5 +10,9 @@ description => PROP_RW ]); +sub isNobody { + +} + 1; diff -r ef37ec102dab -r 16ff604298c7 Lib/IMPL/Security/Principal.pm --- a/Lib/IMPL/Security/Principal.pm Wed May 14 17:27:32 2014 +0400 +++ b/Lib/IMPL/Security/Principal.pm Thu May 15 18:24:28 2014 +0400 @@ -13,7 +13,8 @@ 'IMPL::Security::AbstractPrincipal' => undef ], props => [ - @{AbstractPrincipal->abstractProps()} + @{AbstractPrincipal->abstractProps()}, + isNobody => PROP_RW ] }; @@ -22,7 +23,7 @@ my $nobody; sub nobody { - $nobody = $_[0]->new(name => 'nobody', description => '') unless $nobody; + $nobody = $_[0]->new(name => 'nobody', description => '', isNobody => 1) unless $nobody; return $nobody; } diff -r ef37ec102dab -r 16ff604298c7 Lib/IMPL/Web/Handler/RestController.pm --- a/Lib/IMPL/Web/Handler/RestController.pm Wed May 14 17:27:32 2014 +0400 +++ b/Lib/IMPL/Web/Handler/RestController.pm Thu May 15 18:24:28 2014 +0400 @@ -8,7 +8,8 @@ ResourceInterface => 'IMPL::Web::Application::ResourceInterface', Exception => 'IMPL::Exception', ArgumentExecption => '-IMPL::InvalidArgumentException', - NotFoundException => 'IMPL::Web::NotFoundException' + NotFoundException => 'IMPL::Web::NotFoundException', + Loader => 'IMPL::Code::Loader' }, base => { 'IMPL::Object' => undef, @@ -55,7 +56,12 @@ my @segments = $this->GetResourcePath($request); - my $res = $this->resourceFactory->new( + my $factory = $this->resourceFactory; + + $factory = Loader->default->Require($factory) + unless ref($factory) || eval { $factory->can('new') }; + + my $res = $factory->new( id => 'root', request => $request, location => Locator->new(base => $request->application->baseUrl), diff -r ef37ec102dab -r 16ff604298c7 Lib/IMPL/Web/View/TTView.pm --- a/Lib/IMPL/Web/View/TTView.pm Wed May 14 17:27:32 2014 +0400 +++ b/Lib/IMPL/Web/View/TTView.pm Thu May 15 18:24:28 2014 +0400 @@ -37,7 +37,7 @@ my $context = Context->new($this->options); eval { - warn $context->process('globals' . '.' . $this->tt_ext, $args); + $context->process('globals' . '.' . $this->tt_ext, $args); }; my $layout = delete $args->{layout} || $this->layout;