X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=lib%2FNDWeb.pm;h=952f87272c3bc666a297d3947f90647def3b8a1e;hb=8518049dc07ba0554aea4224d6c195bbacd9b8a6;hp=13cf2b67b326d9567d6183259837bd9ef3ac8aae;hpb=505b74b435bd5a7bfa2fedb551354c9f8fc9609d;p=ndwebbie.git diff --git a/lib/NDWeb.pm b/lib/NDWeb.pm index 13cf2b6..952f872 100644 --- a/lib/NDWeb.pm +++ b/lib/NDWeb.pm @@ -3,27 +3,55 @@ package NDWeb; use strict; use warnings; -use Catalyst::Runtime '5.70'; +use Catalyst::Runtime 5.80; # Set flags and add plugins for the application # # -Debug: activates the debug mode for very useful log messages -# ConfigLoader: will load the configuration from a YAML file in the +# ConfigLoader: will load the configuration from a Config::General file in the # application's home directory -# Static::Simple: will serve static files from the application's root +# Static::Simple: will serve static files from the application's root # directory use parent qw/Catalyst/; +use Catalyst qw/ + -Debug + ConfigLoader + Static::Simple + Unicode + + Authentication + Authentication::Store::NDWeb + Authentication::Credential::Password + + Authorization::Roles + Authorization::ACL + + Session::DynamicExpiry + Session + Session::Store::File + Session::State::Cookie + + Compress::Gzip + Compress::Deflate + + Cache + PageCache +/; our $VERSION = '0.01'; -# Configure the application. +sub signal_bots { + system 'killall','-USR1', 'ndbot.pl'; +} + +# Configure the application. # # Note that settings in ndweb.yml (or other external # configuration file that you set up manually) take precedence # over this when using ConfigLoader. Thus configuration # details given here can function as a default configuration, -# with a external configuration file acting as an override for +# with an external configuration file acting as an override for # local deployment. __PACKAGE__->config( name => 'NDWeb' ); @@ -49,33 +77,9 @@ __PACKAGE__->config( page_cache => { disable_index => 1, }); - +__PACKAGE__->config( default_model => 'Model'); # Start the application -__PACKAGE__->setup(qw/ - -Debug - ConfigLoader - Static::Simple - Unicode - - Authentication - Authentication::Store::NDWeb - Authentication::Credential::Password - - Authorization::Roles - Authorization::ACL - - Session::DynamicExpiry - Session - Session::Store::File - Session::State::Cookie - - Compress::Gzip - Compress::Deflate - - Cache - PageCache - /); - +__PACKAGE__->setup(); __PACKAGE__->deny_access_unless('/users',[qw/admin_users/]); __PACKAGE__->deny_access_unless('/alliances',[qw/alliances/]); @@ -83,6 +87,7 @@ __PACKAGE__->deny_access_unless('/alliances/resources',[qw/alliances_resources/] __PACKAGE__->deny_access_unless('/graphs/alliancevsintel',[qw/graphs_intel/]); __PACKAGE__->deny_access_unless('/graphs/avgalliancevsintel',[qw/graphs_intel/]); __PACKAGE__->deny_access_unless('/members',[qw/members/]); +__PACKAGE__->deny_access_unless('/members/defenders',[qw/members_defenders/]); __PACKAGE__->deny_access_unless('/covop',[qw/covop/]); __PACKAGE__->deny_access_unless('/calls',[qw/calls_edit/]); __PACKAGE__->allow_access_if('/calls/index',[qw/calls_list/]); @@ -92,6 +97,9 @@ __PACKAGE__->allow_access_if('/calls/findCall',[qw/members/]); __PACKAGE__->deny_access_unless('/raids',[qw/raids_edit/]); __PACKAGE__->allow_access_if('/raids/index',[qw//]); __PACKAGE__->allow_access_if('/raids/view',[qw//]); +__PACKAGE__->allow_access_if('/raids/targetcalc',[qw//]); +__PACKAGE__->allow_access_if('/raids/fleetcalc',[qw//]); +__PACKAGE__->allow_access_if('/raids/calcredir',[qw//]); __PACKAGE__->allow_access_if('/raids/findRaid',[qw//]); __PACKAGE__->allow_access_if('/raids/log',[qw//]); __PACKAGE__->deny_access_unless('/intel',[qw/intel/]); @@ -127,7 +135,7 @@ Catalyst developer =head1 LICENSE -This library is free software, you can redistribute it and/or modify +This library is free software. You can redistribute it and/or modify it under the same terms as Perl itself. =cut