This question about Using an extension: Answered

Cheap fix for permission issues


When trying to expand variables you may encounter a permissions issue with the topic and become unable to save the new expanded version of the topic.


The issue might be because the previous topic write sets access control on the topic (if specified in the template) which prevents plugin from writing to the topic again.

A dirty solution is to find this snippet of code in
    $errorMsg = Foswiki::Func::saveTopicText($usersWeb, $wikiName, $text);

and change it to this
    $errorMsg = Foswiki::Func::saveTopicText($usersWeb, $wikiName, $text, 1);

the addition of the 1 tells the saveTopicText function to not check permissions when writing.

QuestionForm edit

Subject Using an extension
Extension NewUserPlugin
Version Foswiki 1.1.3
Status Answered
Topic revision: r1 - 21 Jun 2011, TuckerKern - This page was cached on 04 Jun 2020 - 04:51.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy