X-Git-Url: http://git.rot13.org/?p=BackupPC.git;a=blobdiff_plain;f=lib%2FBackupPC%2FCGI%2FGeneralInfo.pm;h=1f0b1528732d4a5b8a9843b2db907aecea331ab8;hp=1418ace038a6b9fbdf48fb9d61aa65b78413236d;hb=f6fbcc3682d2bc9e7dfdc26e95bd5fcdb359496d;hpb=a7e968ce327855f2ba2624ca8517069a936c9b5b diff --git a/lib/BackupPC/CGI/GeneralInfo.pm b/lib/BackupPC/CGI/GeneralInfo.pm index 1418ace..1f0b152 100644 --- a/lib/BackupPC/CGI/GeneralInfo.pm +++ b/lib/BackupPC/CGI/GeneralInfo.pm @@ -10,7 +10,7 @@ # Craig Barratt # # COPYRIGHT -# Copyright (C) 2003 Craig Barratt +# Copyright (C) 2003-2007 Craig Barratt # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -28,7 +28,7 @@ # #======================================================================== # -# Version 2.1.0_CVS, released 3 Jul 2003. +# Version 3.2.0beta0, released 5 April 2009. # # See http://backuppc.sourceforge.net. # @@ -49,6 +49,7 @@ sub action my $startTime = timeStamp2($Jobs{$host}{startTime}); next if ( $host eq $bpc->trashJob && $Jobs{$host}{processState} ne "running" ); + next if ( !$Privileged && !CheckPermission($host) ); $Jobs{$host}{type} = $Status{$host}{type} if ( $Jobs{$host}{type} eq "" && defined($Status{$host})); (my $cmd = $Jobs{$host}{cmd}) =~ s/$BinDir\///g; @@ -70,6 +71,7 @@ EOF && $Status{$host}{reason} ne "Reason_restore_failed" && (!$Status{$host}{userReq} || $Status{$host}{reason} ne "Reason_no_ping") ); + next if ( !$Privileged && !CheckPermission($host) ); my $startTime = timeStamp2($Status{$host}{startTime}); my($errorTime, $XferViewStr); if ( $Status{$host}{errorTime} > 0 ) { @@ -124,7 +126,9 @@ EOF } elsif ( $Info{cpoolFileCnt} > 0 ) { $poolInfo = $cpoolInfo; } - my $content = eval ("qq{$Lang->{BackupPC_Server_Status}}"); + my $generalInfo = eval("qq{$Lang->{BackupPC_Server_Status_General_Info}}") + if ( $Privileged ); + my $content = eval("qq{$Lang->{BackupPC_Server_Status}}"); Header($Lang->{H_BackupPC_Server_Status}, $content); Trailer(); }