6 use Catalyst::Runtime '5.70';
8 # Set flags and add plugins for the application
10 # -Debug: activates the debug mode for very useful log messages
11 # ConfigLoader: will load the configuration from a YAML file in the
12 # application's home directory
13 # Static::Simple: will serve static files from the application's root
16 use parent qw/Catalyst/;
18 our $VERSION = '0.01';
20 # Configure the application.
22 # Note that settings in ndweb.yml (or other external
23 # configuration file that you set up manually) take precedence
24 # over this when using ConfigLoader. Thus configuration
25 # details given here can function as a default configuration,
26 # with a external configuration file acting as an override for
29 __PACKAGE__->config( name => 'NDWeb' );
30 __PACKAGE__->config->{'Plugin::Authentication'}{'use_session'} = 1;
31 __PACKAGE__->config(session => {
32 storage => "/tmp/ndweb-$>/sesession",
33 directory_umask => 077,
37 __PACKAGE__->config( cache => {
39 class => "Cache::FileCache",
40 cache_root => "/tmp/ndweb-$>",
41 directory_umask => 077,
45 __PACKAGE__->config( page_cache => {
46 set_http_headers => 1,
50 # Start the application
51 __PACKAGE__->setup(qw/
57 Authentication::Store::NDWeb
58 Authentication::Credential::Password
63 Session::DynamicExpiry
66 Session::State::Cookie
76 __PACKAGE__->deny_access_unless('/users',[qw/admin_users/]);
77 __PACKAGE__->deny_access_unless('/alliances',[qw/alliances/]);
78 __PACKAGE__->deny_access_unless('/alliances/resources',[qw/alliances_resources/]);
79 __PACKAGE__->deny_access_unless('/graphs/alliancevsintel',[qw/graphs_intel/]);
80 __PACKAGE__->deny_access_unless('/graphs/avgalliancevsintel',[qw/graphs_intel/]);
81 __PACKAGE__->deny_access_unless('/members',[qw/members/]);
82 __PACKAGE__->deny_access_unless('/covop',[qw/covop/]);
83 __PACKAGE__->deny_access_unless('/calls',[qw/calls_edit/]);
84 __PACKAGE__->allow_access_if('/calls/index',[qw/calls_list/]);
85 __PACKAGE__->allow_access_if('/calls/list',[qw/calls_list/]);
86 __PACKAGE__->allow_access_if('/calls/edit',[qw/members/]);
87 __PACKAGE__->deny_access_unless('/raids',[qw/raids_edit/]);
88 __PACKAGE__->allow_access_if('/raids/index',[qw//]);
89 __PACKAGE__->allow_access_if('/raids/view',[qw//]);
90 __PACKAGE__->allow_access_if('/raids/findRaid',[qw//]);
91 __PACKAGE__->allow_access_if('/raids/log',[qw//]);
92 __PACKAGE__->deny_access_unless('/intel',[qw/intel/]);
93 __PACKAGE__->deny_access_unless('/intel/members',[qw/intel_members/]);
94 __PACKAGE__->deny_access_unless('/intel/member',[qw/intel_member/]);
95 __PACKAGE__->deny_access_unless('/intel/naps',[qw/intel_naps/]);
96 __PACKAGE__->deny_access_unless('/jsrpc',[qw//]);
97 __PACKAGE__->deny_access_unless('/forum/allUnread',[qw//]);
98 __PACKAGE__->deny_access_unless('/settings',[qw//]);
102 NDWeb - Catalyst based application
106 script/ndweb_server.pl
110 [enter your description here]
114 L<NDWeb::Controller::Root>, L<Catalyst>
122 This library is free software, you can redistribute it and/or modify
123 it under the same terms as Perl itself.