Is it possible to show a list of Allowed Webs for a User after login?
My situation is the following: I got customers with access to different projects. I would like to show them a list of links to the Webs (Projects) where they are allowed to View.
Is it possible using searchs and metadata from the Registration form, or something like that....
Regards.
TWiki version: 01-Dec-2001
--
AnibalRojas - 25 Mar 2002
Answer
This sounds like a feature of an entitlement engine. TWiki does not support that directly, but you can get there. Here is the idea:
- You need the user tobe authenticated. This can be done in several ways:
- the
view script is authenticated by default
- create a sym link from
view to viewauth, authenticate viewauth, and create a link to a topic with viewauth instead of view (%SCRIPTURL%/viewauth%SCRIPTSUFFIX%/%WEB%/MyAllowedLinks). You can also remember the user once loged in. See docs for details.
- Use cookies
- You need the latest TWikiAlphaRelease code or Richard's
andgrep script in CategorySearchForm for regular expression search with AND.
- In each group topic that represents access restriction for a web add a unique identifier not present in other group topics, e.g.
-
Defines view access of [[FOObar.WebHome][FOObar]] web
- Create a MyAllowedLinks topic that does a regular expression
%SEARCH{}% for all groups where the user belongs to, something like: (this is not tested)
-
search="Defines view access of \[.*?\] web;Set GROUP \=\s.*%WIKINAME%"
- and do a FormattedSearch output by extracting the link to the web into a bullet list: (again, not tested)
-
format=" * $pattern(.*?Defines view access of (\[.*?\]) web.*)"
--
PeterThoeny - 30 Mar 2002