0
|
1 package Implab::Web::Resources::Root;
|
|
2 use strict;
|
|
3
|
|
4 use IMPL::declare {
|
|
5 require => {
|
|
6 LibraryResource => '-Benzin::Web::Resources::Doxygen::Library',
|
11
|
7 UserResource => '-Benzin::Web::Resources::UserResource',
|
|
8 Sec => 'IMPL::Security'
|
0
|
9 },
|
|
10 base => [
|
|
11 'IMPL::Web::Application::Resource' => '@_'
|
|
12 ]
|
|
13 };
|
|
14
|
|
15 sub children {
|
11
|
16 my $this = shift;
|
0
|
17 return {
|
|
18 library => {
|
11
|
19 class => LibraryResource,
|
|
20 connection => $this->application->connections->{doxLibrary}
|
0
|
21 },
|
|
22 user => {
|
11
|
23 model => sub {
|
|
24 Sec->principal;
|
|
25 },
|
|
26 role => 'user',
|
0
|
27 class => UserResource,
|
|
28 components => [qw(login logout passwd edit)]
|
|
29 }
|
|
30 };
|
|
31 }
|
|
32
|
|
33 1; |