Changeset 8645


Ignore:
Timestamp:
08/22/10 13:06:48 (21 months ago)
Author:
CrawfordCurrie
Message:

Item9318: don't set the text on the saved topic until *after* the access controls have verified it's writable, otherwise we deny ourselves write access

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/core/lib/Foswiki/Func.pm

    r8626 r8645  
    15471547    ( $web, $topic ) = _validateWTA( $web, $topic ); 
    15481548    my $topicObject = 
    1549       Foswiki::Meta->new( $Foswiki::Plugins::SESSION, $web, $topic, $text ); 
     1549      Foswiki::Meta->new( $Foswiki::Plugins::SESSION, $web, $topic ); 
    15501550 
    15511551    unless ( $topicObject->haveAccess('CHANGE') ) { 
     
    15551555    } 
    15561556 
     1557    # Set the new text and meta, now that access to the existing topic 
     1558    # is verified 
     1559    $topicObject->text( $text ); 
    15571560    $topicObject->copyFrom($smeta) if $smeta; 
    15581561    return $topicObject->save(%$options); 
Note: See TracChangeset for help on using the changeset viewer.