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,
35 __PACKAGE__->config( cache => {
37 class => "Cache::FileCache",
38 cache_root => "/tmp/ndweb-$>",
39 directory_umask => 077,
43 __PACKAGE__->config( page_cache => {
44 set_http_headers => 1,
48 # Start the application
49 __PACKAGE__->setup(qw/
55 Authentication::Store::NDWeb
56 Authentication::Credential::Password
63 Session::State::Cookie
70 __PACKAGE__->deny_access_unless('/users',[qw/admin_users/]);
71 __PACKAGE__->deny_access_unless('/alliances/resources',[qw/alliances_resources/]);
72 __PACKAGE__->deny_access_unless('/graphs/alliancevsintel',[qw/graphs_intel/]);
73 __PACKAGE__->deny_access_unless('/graphs/avgalliancevsintel',[qw/graphs_intel/]);
74 __PACKAGE__->deny_access_unless('/members',[qw/members/]);
75 __PACKAGE__->deny_access_unless('/covop',[qw/covop/]);
76 __PACKAGE__->deny_access_unless('/calls/list',[qw/calls_list/]);
77 __PACKAGE__->deny_access_unless('/calls/postcallcomment',[qw/calls_edit/]);
78 __PACKAGE__->deny_access_unless('/calls/postcallupdate',[qw/calls_edit/]);
79 __PACKAGE__->deny_access_unless('/calls/postattackerupdate',[qw/calls_edit/]);
80 __PACKAGE__->deny_access_unless('/raids',[qw/raids_edit/]);
81 __PACKAGE__->allow_access_if('/raids/index',1);
82 __PACKAGE__->allow_access_if('/raids/view',1);
83 __PACKAGE__->allow_access_if('/raids/findRaid',1);
84 __PACKAGE__->allow_access_if('/raids/log',1);
88 NDWeb - Catalyst based application
92 script/ndweb_server.pl
96 [enter your description here]
100 L<NDWeb::Controller::Root>, L<Catalyst>
108 This library is free software, you can redistribute it and/or modify
109 it under the same terms as Perl itself.