Tags:
create new tag
, view all tags

Don't show WebPreferences to non-admins

Everyone sees WebPreferences in the WebLeftBar but only admins typically care.

I propose we drop WebPreferences from _default/WebLeftBar.txt

-- MartinCleaver - 02 Nov 2005

How about we - somehow - make it conditional on the user being logged in and being a member of the TWikiAdminGroup. That would make more sense than removing it altogether.

-- AntonAylward - 02 Nov 2005

I was thinking of something like this, only for some kind of test for membership of TWikiAdminGroup. This test makes sure someone is logged in and thereore their creation of a new page is auditable, a corporate requirement in many situations.

* %IF{"context authenticated" then="[[CreateNewTopic][Create New Topic]]"}%

In addition, wont restricting access to WebPreferences cause other problems?

-- AntonAylward - 02 Nov 2005

The link could be rendered depending on the access rights using

%SEARCH{"*" topic="WebPreferences" nonoise="on" format="$web.$topic"}%

Or if you've got a whole slew of admin tools that should only be shown to admins then create a AdminWebLeftBar, restrict the view access and use

%INCLUDE{"AdminWebLeftBar" warn="off"}%

-- MichaelDaum - 02 Nov 2005

This only works becuase the code that scans WebPreferences for settings ignores whether you have access to it or not. If that were not the case you couldn't use WebPreferences to set anything for the web, color, skin, who cam move topics and so forth.

Personally I prefer a construct like

~~%IF{ "$ WikiName in %MAINWEB%.TwikiAdminGroup.GROUP"
~~~~~then="......"
~~~~~else=""
~~}%
Of course that also assumes that the syntax of TopicVarsPlugin is migrated into the core, which would be a Good Thing

-- AntonAylward - 02 Nov 2005

If you hide things like "Create new topic" you might also give users no idea this functionality is there. A solution is to write grayed out text instead of the link.

TopicVarsPlugin: seconded in BringTopicVarsIntoCore.

-- ArthurClemens - 02 Nov 2005

I though there was already an IF construct in Dakar?

-- SamHasler - 13 Nov 2005

Edit | Attach | Watch | Print version | History: r10 < r9 < r8 < r7 < r6 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r10 - 2006-04-06 - MeredithLesly
 
  • 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-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.