Question
OK, so now it doesn't
actually work the way that I wanted.
This is completely workable, but not doing what I want.
How do I create a list of links in WebLinks that is only displayed when a certain group of people are logged in?
I tried the following...
%IFACCESS{ type="change" user="Main.TWikiAdminGroup" glue="off" then=" * %ICONURL{wrench}% [[WebPreferences][Settings]]" else="" }%
But that doesn't work at all. It's not parsed.
There must be a way for this, no? Or
did I use IFDEFINED wrongly?
Environment
--
KwangErnLiew - 10 Feb 2007
Answer
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
Last night I've briefly discussed this with
SvenDowideit and a good way to do this is...
1) create a RestrictedWebList and set
ALLOWTOPICVIEW/DENYTOPICVIEW
2) slap it into WebLinks with an with a warn=off
3) works. Untested, yet. But I'm quite sure it works.
Why didn't I think of it in the first place... :|
--
KwangErnLiew - 11 Feb 2007
This might work out fine, but here's a shorter solution (less topics) taken from the latest
NatSkin:
* [[%TWIKIWEB%.WelcomeGuest][%MAKETEXT{"Welcome"}%]]
* [[%TWIKIREGISTRATION%][%MAKETEXT{"Registration"}%]]
* [[%MAINWEB%.TWikiUsers][%MAKETEXT{"Users"}%]]
* [[%MAINWEB%.TWikiGroups][%MAKETEXT{"Groups"}%]]
* [[%TWIKIWEB%.ChangePassword][%MAKETEXT{"Password"}%]]
%IFDEFINEDTHEN{"%IFACCESS{"%MAINWEB%.WebLinks" type="change"}%" as="1"}%
<!-- -->
* [[%BASEWEB%.WebPreferences][%MAKETEXT{"Preferences"}%]]
* [[%MAINWEB%.TWikiPreferences][%MAKETEXT{"SitePreferences"}%]]
%FIDEFINED%
%STOPINCLUDE%
<!--
* DISABLED_Set ALLOWTOPICCHANGE = TWikiAdminGroup
-->
This is the definition of the WebLinks for the Main web. As you can see, it renders an extended navigation for guys in the TWikiAdminGroup.
While this reduces the amount of topics that you need to generate the content of different navigations, you will still need a topic to check authorization against. In this case, this is the WebLinks topic itself. But this can be any arbitrary topic that applies the desired permissions.
--
MichaelDaum - 12 Feb 2007