Skip to content

Commit

Permalink
Item10401: more changes
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.foswiki.org/branches/Release01x01@10797 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
MichaelDaum authored and MichaelDaum committed Feb 24, 2011
1 parent 5cc5a0b commit ffae38e
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions HistoryPlugin/lib/Foswiki/Plugins/HistoryPlugin.pm
Expand Up @@ -4,7 +4,9 @@ package Foswiki::Plugins::HistoryPlugin;

use strict;
use warnings;
use Foswiki::Func;
use Foswiki::Func ();
use Error qw(:try);
use Foswiki::AccessControlException ();

# =========================
use vars qw( $VERSION $RELEASE $NO_PREFS_IN_TOPIC $SHORTDESCRIPTION);
Expand Down Expand Up @@ -47,6 +49,11 @@ sub handleHistory {
return "Topic $web.$topic does not exist";
}

unless (Foswiki::Func::checkAccessPermission("VIEW", $session->{user}, undef, $topic, $web)) {
throw Foswiki::AccessControlException("VIEW", $session->{user},
$web, $topic, $Foswiki::Meta::reason );
}

# Get revisions

my $maxrev = ( Foswiki::Func::getRevisionInfo( $web, $topic ) )[2];
Expand Down Expand Up @@ -99,7 +106,7 @@ sub handleHistory {
$checkFlag++;
$revinfo =~ s/\$web/$web/g;
$revinfo =~ s/\$topic/$topic/g;
$revinfo =~ s/\$rev/$revout/g;
$revinfo =~ s/\$rev/$rev/g;
$revinfo =~ s/\$date/Foswiki::Func::formatTime($date)/ge;
$revinfo =~ s/\$username/$user/g;
$revinfo =~ s/\$wikiname/$wikiName/g;
Expand Down

0 comments on commit ffae38e

Please sign in to comment.