Skip to content
Permalink
Browse files

Item10464: Add some checks

git-svn-id: http://svn.foswiki.org/trunk@10998 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information...
GeorgeClark GeorgeClark
GeorgeClark authored and GeorgeClark committed Mar 10, 2011
1 parent 07b8805 commit a1b4e834e540772705101c3de8d3dadc8075f496
Showing with 6 additions and 0 deletions.
  1. +6 −0 core/lib/Foswiki/UI/Save.pm
@@ -43,6 +43,12 @@ sub buildNewTopic {
my $topicExists =
$session->topicExists( $topicObject->web, $topicObject->topic );

# Prevent creating a topic in a web without change access
unless ( $topicExists ) {
my $webObject = Foswiki::Meta->new( $session, $topicObject->web );
Foswiki::UI::checkAccess( $session, 'CHANGE', $webObject );
}

# Prevent saving existing topic?
my $onlyNewTopic = Foswiki::isTrue( $query->param('onlynewtopic') );
if ( $onlyNewTopic && $topicExists ) {

0 comments on commit a1b4e83

Please sign in to comment.
You can’t perform that action at this time.