diff lib/Implab/Web/Resources/Root.pm @ 11:573272ec604b

almost comlete doxygen library
author sergey
date Thu, 15 May 2014 18:24:02 +0400
parents aac1085b256d
children
line wrap: on
line diff
--- a/lib/Implab/Web/Resources/Root.pm	Thu May 15 01:51:42 2014 +0400
+++ b/lib/Implab/Web/Resources/Root.pm	Thu May 15 18:24:02 2014 +0400
@@ -4,7 +4,8 @@
 use IMPL::declare {
 	require => {
 		LibraryResource => '-Benzin::Web::Resources::Doxygen::Library',
-		UserResource => '-Benzin::Web::Resources::UserResource'
+		UserResource => '-Benzin::Web::Resources::UserResource',
+		Sec => 'IMPL::Security'
 	},
 	base => [
 		'IMPL::Web::Application::Resource' => '@_'
@@ -12,11 +13,17 @@
 };
 
 sub children {
+	my $this = shift;
 	return {
 		library => {
-			class => LibraryResource
+			class => LibraryResource,
+			connection => $this->application->connections->{doxLibrary}
 		},
 		user => {
+			model => sub {
+				Sec->principal;
+			},
+			role => 'user',
 			class => UserResource,
 			components => [qw(login logout passwd edit)]
 		}