Feature Proposal: Extend FilterPlugin with group permissions

Motivation

Imagine you want to clip a specific text section from the view but only for a specific wiki group.

Description and Documentation

FilterPlugin provides the basics for cutting text sections. All we need to do is adding parameters for allowing and denying wiki groups.

Do you think this feature is too far away from the basic idea of the FilterPlugin and should be developed as a fresh new plugin?

Examples

Impact

%WHATDOESITAFFECT%
edit

Implementation

-- Contributors: SvenHess - 28 Aug 2009

Discussion

Normally that's done differently, i.e. not by cutting out text that is not allowed to be there. Instead you don't insert it to the page when you are not allowed to view it. There are two methods to do that:

  1. Move the view-restricted section to a separate topic and view-restrict this topic via ALLOWTOPICVIEW; then insert this fragment back into the original place using something like %INCLUDE{"AdminStuff" warn="off"}%
  2. The other way will only add a css attribute display:none to a DIV. Use IfStatements to toggle these attribute. This will be something like this:
    <div %IF{" user is not in group x " then="style='display:none'"}%
    ...
    </div> 

Note that the second method will leave the text in the markup but only hide it. So looking at the page source will still show it.

In any case FilterPlugin is the wrong approach even though the name of the extension might seem to match to your use case.

-- MichaelDaum - 28 Aug 2009

Hi Michael,

thanks for the fast reply. Unfortunately both suggestions do not satisfy completely. The first gets to unhandy if there are too many concerning topics. And the second is just a workaround. But I agree with you to not include the feature in the FilterPlugin. Rather I am developing a new one for that isolate feature.

-- SvenHess - 28 Aug 2009
Topic revision: r5 - 09 Dec 2009, MichaelDaum
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