view lib/Implab/Web/Resources/Root.pm @ 13:a9ce584a7f3b

test for mercurial repositories
author sergey
date Mon, 19 May 2014 04:34:28 +0400
parents 573272ec604b
children
line wrap: on
line source

package Implab::Web::Resources::Root;
use strict;

use IMPL::declare {
	require => {
		LibraryResource => '-Benzin::Web::Resources::Doxygen::Library',
		UserResource => '-Benzin::Web::Resources::UserResource',
		Sec => 'IMPL::Security'
	},
	base => [
		'IMPL::Web::Application::Resource' => '@_'
	]
};

sub children {
	my $this = shift;
	return {
		library => {
			class => LibraryResource,
			connection => $this->application->connections->{doxLibrary}
		},
		user => {
			model => sub {
				Sec->principal;
			},
			role => 'user',
			class => UserResource,
			components => [qw(login logout passwd edit)]
		}
	};	
}

1;