Question
Is there a TWikiGroup variable, like %WIKINAME% will display your current user:
TWikiGuest.
I would like to use such a variable in combination with the SpreadSheetPlugin in order to hide content on a page from all but certain groups.
If there isn't a %TWIKIGROUP%, or something similar, then how could I go about setting up such a thing?
Thanks
--
JensPagotto - 04 Jul 2006
Answer
If you answer a question - or have a question you asked answered by someone - please remember to edit the page and set the status to answered. The status is in a drop-down list below the edit box.
Not yet, if I remember correct.
--
FranzJosefSilli - 04 Jul 2006
Okay, well if there is a lack of a
%TWIKIGROUP% function then prehaps there is a different way to achieve the results I want.
If I use:
%INCLUDE{MyTopic}% on a page, where MyTopic is restricted for some groups using the "TOPICVIEW =" setting then will it hide that topic from some users?
Yes, that partially works, but when a unprivilaged user logs in they get the error message
"No permission to view MyTopic". Which is not ideal. Can we suppress this message?
--
JensPagotto - 06 Jul 2006
You could try a
%SEARCH% to check whether a user is listed in the desired TWiki group topic. Send the output to a SpreadSheetPlugin variable and test it. Not very helpful, if you have recursive group definitions.
Sounds like a good example for a new
TWiki tag.
--
PankajPant - 07 Jul 2006
Nice idea Pankaj.
For now I have used the =
Warning: Can't find topic "".""
= statment and set
warn to
off, which seems to do the trick, but it's not ideal.
If no-one else has any input then I guess we can close this question off as answered.
--
JensPagotto - 07 Jul 2006
%GROUPS% is in releases from 4.0.3 onwards, though it has a known problem (will crash TWiki if there are no groups defined); fixed in 4.1)
--
CrawfordCurrie - 19 Jul 2006