Skip to content

Commit

Permalink
Item11963: fixed unintended redirect after save when accessing a view…
Browse files Browse the repository at this point in the history
… restricted data form

git-svn-id: http://svn.foswiki.org/trunk@15058 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
MichaelDaum authored and MichaelDaum committed Jun 21, 2012
1 parent 61b7994 commit 760aab4
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
1 change: 1 addition & 0 deletions ICalPlugin/data/System/ICalPlugin.txt
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ Finally, the standard foswiki escape variables are expanded:
| Release: | %$RELEASE% |
| Version: | %$VERSION% |
| Change History: | <!-- versions below in reverse order -->&nbsp; |
| 21 Jun 2012 | fixed unintended redirect after save when accessing a view restricted data form |
| 08 May 2012 | fixed processing of weekly recurrences without a <nop>StartDate |
| 07 May 2012 | made dependency on Foswiki:Extensions/MetaDataPlugin optional |
| 27 Apr 2012 | expand macros in ICALPLUGIN_CALENDAR variable; \
Expand Down
8 changes: 3 additions & 5 deletions ICalPlugin/lib/Foswiki/Plugins/ICalPlugin.pm
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use warnings;
use Foswiki::Func ();

our $VERSION = '$Rev$';
our $RELEASE = '1.12';
our $RELEASE = '1.13';
our $SHORTDESCRIPTION = 'Access ical data in wikiapps';
our $NO_PREFS_IN_TOPIC = 1;
our $core;
Expand All @@ -32,6 +32,8 @@ our $baseWeb;
sub initPlugin {
($baseTopic, $baseWeb) = @_;

$core = undef;

Foswiki::Func::registerTagHandler(
'FORMATICAL',
sub {
Expand Down Expand Up @@ -60,10 +62,6 @@ sub initPlugin {
return 1;
}

###############################################################################
sub finishPlugin {
$core = undef;
}

###############################################################################
sub afterSaveHandler {
Expand Down
9 changes: 8 additions & 1 deletion ICalPlugin/lib/Foswiki/Plugins/ICalPlugin/Core.pm
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,14 @@ sub getEventsFromMetaData {
next unless Foswiki::Func::topicExists($formWeb, $formTopic);

# now check the TopicType for "EventTopic"
my $form = new Foswiki::Form($Foswiki::Plugins::SESSION, $formWeb, $formTopic);
my $form;
try {
$form = new Foswiki::Form($Foswiki::Plugins::SESSION, $formWeb, $formTopic);
} catch Foswiki::AccessControlException with {
# catch but simply bail out
writeDebug("access exception reading $formWeb.$formTopic");
};
next unless $form;

my $topicTypeField = $form->getField('TopicType');
next unless $topicTypeField;
Expand Down

0 comments on commit 760aab4

Please sign in to comment.