summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2009-01-27 09:39:14 +0000
committerivan <ivan>2009-01-27 09:39:14 +0000
commitcbcec55dd7f3dbf21e9bd84e916d70174c0324f9 (patch)
tree16a12926d4ed766f72ef74939a07c8e893b21aa4
parent51c5ca4c306af5d35967b130bcd0c8f563b7b23b (diff)
add ACL to allow download of browse/ stuff too, when possible. RT#4681
-rw-r--r--FS/FS/AccessRight.pm4
-rw-r--r--httemplate/search/elements/search.html3
2 files changed, 7 insertions, 0 deletions
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(