From cbcec55dd7f3dbf21e9bd84e916d70174c0324f9 Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 27 Jan 2009 09:39:14 +0000 Subject: [PATCH] add ACL to allow download of browse/ stuff too, when possible. RT#4681 --- FS/FS/AccessRight.pm | 4 ++++ httemplate/search/elements/search.html | 3 +++ 2 files changed, 7 insertions(+) diff --git a/FS/FS/AccessRight.pm b/FS/FS/AccessRight.pm index b016d1885..bf076f649 100644 --- a/FS/FS/AccessRight.pm +++ b/FS/FS/AccessRight.pm @@ -250,6 +250,10 @@ tie my %rights, 'Tie::IxHash', { rightname=>'Broadband global configuration', global=>1 }, { rightname=>'Configuration', global=>1 }, #most of the rest of the configuraiton is not agent-virtualized + + { rightname=>'Configuration download', }, #description of how it affects + #search/elements/search.html + ], ; diff --git a/httemplate/search/elements/search.html b/httemplate/search/elements/search.html index 4b8fc441e..dd0555c6d 100644 --- a/httemplate/search/elements/search.html +++ b/httemplate/search/elements/search.html @@ -699,6 +699,9 @@ my %align = ( $opt{align} = [ map $align{$_}, split(//, $opt{align}) ], unless !$opt{align} || ref($opt{align}); +$opt{disable_download} = 0 + if $opt{disable_download} && $curuser->access_right('Configuration download'); + if ( $opt{'agent_virt'} ) { my $agentnums_sql = $curuser->agentnums_sql( -- 2.11.0