Feature Proposal: Read-only skin mode
Motivation
Use cases where read-only mode is desired:
- The TWiki web is supposed to be read-only for end users and TWiki admins.
- In some TWiki installations it is desirable to keep the Main web clean, e.g. reserve it just for user homepages and TWiki groups.
- Pages that make up TWiki application logic are supposed to be read-only. For example, in a contact database there is no reason to have an edit button the page that has a form to submit a new contact person.
This proposal adds a new feature to set a preferences variable to remove the relevant links to modify a page.
Description and Documentation
Add the following preferences setting to a topic or
WebPreferences to turn the skin into read-only mode:
* Set READONLYSKINMODE = 1
Note that this feature does not replace access control, its intent is to give a visual clue that a page is read-only.
READONLYSKINMODE |
Description |
(not set) |
Normal edit mode |
0 |
Normal edit mode |
1 |
No "edit" and "attach" links/buttons in top menu, top bar, and topic action bar at bottom is removed |
The
PatternSkin and
TopMenuSkin are enhanced to support this feature.
PatternSkin enhancements
If in read-only mode:
- remove
[Edit]
and [Attach]
buttons on top
- remove topic action links bar at bottom
- add hard to see edit link: Turn the dash before the WikiName in the "topic revision" row into an edit link, such as:
Topic revision: r10 - 2011-05-17 - PeterThoeny
TopMenuSkin enhancements
If in read-only mode:
- remove
[Edit]
and [Attach]
buttons on top
- remove topic action links bar at bottom (this is inherited from the PatternSkin)
- remove the "Edit " pulldown menu
Open question
- What happens with red-links? Disable them, e.g. show as plain text? It is not that easy to do this right, for example, a red-link could point to another web that is not read-only.
Impact
Implementation
--
Contributors: PeterThoeny - 2011-01-22
Discussion
This is now an accepted proposal by 7 day feedback period.
--
PeterThoeny - 2011-02-12
I simplified the spec: Only 0 and 1, no more 2.
--
PeterThoeny - 2011-05-18
This is now implemented and documented in
SVN trunk. The
PatternSkin and the
TopMenuSkin are also published on twiki.org.
--
PeterThoeny - 2011-05-18