create new tag
, view all tags

Feature Proposals » Add ignorePermissions parameter to TWiki::Store::saveTopic


Current State: Developer: Reason: Date: Concerns By: Bug Tracking: Proposed For:
AcceptedProposal ThomasWeigert AcceptedBy7DayFeedbackPeriod 2010-09-22     KampalaRelease

Edit Form

DateOfCommitment:   Format: YYYY-MM-DD


The advised mode in TWiki when saving a topic is to check permissions, lock the file, save the topic, and unlock. However, TWiki::Store::saveTopic checks permissions again. There probably was the intention to make this check optional based on some parameter.

Evidence for this is that TWiki::Func::saveTopicText explicitly gives this choice, but when it bottoms out in saveTopic the permissions are nevertheless checked again in spite of the documentation stating that permission checking is dependent on the provided option.

Further, there is one situation when saveTopic does not check for permissions, which is when no user is given. However, that scenario does not quite make sense, as if no user is given, the RCS backend complains.

This observation explains why there are several redundant permission checks in the logs.

This proposal originated at SaveByAdmin.

Description and Documentation

saveText takes a number of options. Add one more option: ignorePermissions which, if true, would cause the topic to be saved without again checking permissions. If the option is not given our false, saveTopic behaves as currently, with one exception. It is not allowed to omit the user.




The implementation is a one line change in TWiki::Func::saveTopic, inserting the test for the flag instead of the test for the user flag.

-- Contributors: ThomasWeigert - 2010-09-22


Makes sense to add this parameter.

I renamed the topic to a more explicit name.

-- PeterThoeny - 2010-09-22

No concerns have been raised, this is now a proposal that is AcceptedBy7DayFeedbackPeriod.

This is a small and safe enough feature that we can take into the next TWiki-5.0 patch release, e.g. not just for IstanbulRelease.

-- PeterThoeny - 2010-10-02

This is not yet implemented. I change it from HelsinkiRelease to IstanbulRelease.

-- PeterThoeny - 2011-03-26

Edit | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r6 - 2013-10-11 - PeterThoeny
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.