diff --git a/Netdisco/Changes b/Netdisco/Changes index c9ece9b0..b1080230 100644 --- a/Netdisco/Changes +++ b/Netdisco/Changes @@ -4,6 +4,10 @@ * Filter by VLAN in Pors with Multiple Nodes report + [BUG FIXES] + + * Non-admin reports require admin login + 2.033002 - 2015-09-29 [ENHANCEMENTS] diff --git a/Netdisco/lib/App/Netdisco/Web/Plugin/Report/ApRadioChannelPower.pm b/Netdisco/lib/App/Netdisco/Web/Plugin/Report/ApRadioChannelPower.pm index a8583441..8ab46374 100644 --- a/Netdisco/lib/App/Netdisco/Web/Plugin/Report/ApRadioChannelPower.pm +++ b/Netdisco/lib/App/Netdisco/Web/Plugin/Report/ApRadioChannelPower.pm @@ -15,19 +15,14 @@ register_report( } ); -get '/ajax/content/report/apradiochannelpower/data' => require_role admin => - sub { +get '/ajax/content/report/apradiochannelpower/data' => require_login sub { send_error( 'Missing parameter', 400 ) unless ( param('draw') && param('draw') =~ /\d+/ ); my $rs = schema('netdisco')->resultset('Virtual::ApRadioChannelPower'); - my $exp_params = expand_hash( scalar params ); - my $recordsTotal = $rs->count; - my @data = $rs->get_datatables_data($exp_params)->hri->all; - my $recordsFiltered = $rs->get_datatables_filtered_count($exp_params); content_type 'application/json'; @@ -46,7 +41,6 @@ get '/ajax/content/report/apradiochannelpower' => require_login sub { template 'ajax/report/apradiochannelpower.tt', {}, { layout => undef }; } - else { my @results = schema('netdisco')->resultset('Virtual::ApRadioChannelPower') diff --git a/Netdisco/lib/App/Netdisco/Web/Plugin/Report/DevicePoeStatus.pm b/Netdisco/lib/App/Netdisco/Web/Plugin/Report/DevicePoeStatus.pm index 50ba0e1d..08f2a95d 100644 --- a/Netdisco/lib/App/Netdisco/Web/Plugin/Report/DevicePoeStatus.pm +++ b/Netdisco/lib/App/Netdisco/Web/Plugin/Report/DevicePoeStatus.pm @@ -15,7 +15,7 @@ register_report( } ); -get '/ajax/content/report/devicepoestatus/data' => require_role admin => sub { +get '/ajax/content/report/devicepoestatus/data' => require_login sub { send_error( 'Missing parameter', 400 ) unless ( param('draw') && param('draw') =~ /\d+/ );