Tags:
create new tag
view all tags

Feature Proposal: User subwebs instead of user topics

Motivation

On a TWiki site having thousands of users and webs, topic and web accountability is important. Webs need to have their owners clearly defined for TWiki admins to be able to take actions such as deletion of unused webs. Along the same line, the Main web (more accurately $TWiki::cfg{UsersWeb} web) needs to be locked down to prevent random topics from accumulating. This means that a user can have only FirstLast, FirstLastLeftBar, and FirstLastBookmarks topics on the Main web. This is inconvenient for users who want to have more topics for their personal use.

It's possible to allow users to have a web for their personal use, but that would be messy on a large site - webs for personal use and webs for team activities co-existing at the same level. If you have thousands of top level webs (non subweb) and thousands of users, then you may end up much more top level webs than otherwise.

If users have Main/FirstLast subwebs instead of Main.FirstLast topics, it would be a good compromise between accountability, convenience, and tidiness of the site. Since ownership is obvious with topics of a user subweb, there is no danger of unaccounted-for topics accumulating.

Description and Documentation

As you can see above, this feature is intended to be used on a large site. So this is turned off by default and turned on by $TWiki::cfg{EnableUserSubwebs}.

This feature is intended to be used together with ForbidSubwebNameSameAsTopicName so that users keep identified as Main.FirstLast.

TWiki core

The TWiki core will get the following enhancements.

For user preferences, the topic named $TWiki::cfg{UserPrefsTopicName} (defaults to WebHome) on the user's subweb is read instead of Main.FirstLast topic if the feature is turned on. $TWiki::cfg{UserPrefsTopicName} is reflected in %USERPREFSTOPIC%. These are in parallel with $TWiki::cfg{WikiPrefsTopicName} and %WEBPREFSTOPIC%.

User mapping handler

A user mapping handler supporting this feature needs to:
  • Create a subweb named "Main/FirstLast" instead of a topic named "Main.FirstLast" upon user registration if the feature is turned on. There are handlers not supporting user registration - user information is obtained from somewhere such as LDAP and the HTTP server. In that case, the handler needs to provide a way to create users' subwebs on users' initiative.
  • Do user management tasks accordingly depending on the feature turned on or not.
This feature being for a large site, it's up to a user mapping handler to support this feature or not, needless to say.

Skins

There are skins referring to topics such as Main.FirstLastLeftBar (pattern skin's WebLeftBar) and Main.FirstLastBookmarks (top menu skin). For such skins to support this feature, the skins need to be enhanced so that they refers to topics under the user's subweb such as Main/FirstLast.UserLeftBar and Main/FirstLast.UserBookmarks.

Examples

Let's assume:

  • $TWiki::cfg{EnableUserSubwebs} is true
  • $TWiki::cfg{UserPrefsTopicName} is "UserPreferences"
Then
  • The user HideyoImazu has Main/HideyoImazu subweb
  • Main/HideyoImazu.UserPreferences is read for the user's preferences

Impact

Implementation

-- Contributors: HideyoImazu - 2012-07-03

Discussion

The idea is not bad, but I would prefer a a separate user/group web, where all user and group topics are stored - not in sub webs. This would make the process of upgrading easier because all user information is stored in single separated place apart from standard topics in Main web.

I do not know if using a subweb for each user might create problems for checking access rights and searches across users (user list). Referencing the user in groups and topics (access rights) would require more typing (bad thing for end users) unless there would be something like alias function.

-- MichaelGulitz - 2012-07-03

As Hideyo-san mentioned, this is for very big TWiki deployments. IMHO for small deployments, it increases the complexity more than it gains on benefits, so it should be optional (as suggested).

As for implementation, the current user registration, user profile page templates etc are already done in the TWikiUserMappingContrib extension. I recommend to implement that as a different extension that can installed instead of the TWikiUserMappingContrib. If there are dependencies in the core code it can be made with $TWiki::cfg{EnableUserSubwebs} etc configure settings as suggested.

The devil is in the detail. Users may have additional pages that depend on the skin used. The PatternSkin introduces Main.FirstLastLeftBar. The default TopMenuSkin introduces Main.FirstLastBookmarks and disregards Main.FirstLastLeftBar.

Another devil in the detail: User reports (Main.UserList etc.) assume topic location and form field names. For example, attaching a profile picture updates the "Image" form field name. For example, the UserReports (a library for TWiki app developers) I am working on assume Main.FirstLast and profile picture name defined by "Image" form field name.

-- PeterThoeny - 2012-07-03

Michael, this is intended to be implemented in combination with ForbidSubwebNameSameAsTopicName. Users will keep identified as Main.FirstLast.

Peter, the need for skin modification is mentioned together with %USERWEBSENABLED%, which will be used by the skins supporting user webs. I also added that it's up to a user mapping to support this. TWikiUserMapping presumably being used by small to mid-sized TWiki installations, it doesn't necessarily need to support $TWiki::cfg{EnableUserSubwebs} being true, I understand.

-- HideyoImazu - 2012-07-04

So there is consensus to implement this as a custom user mapping manager?

-- PeterThoeny - 2012-07-11

There are some core enhancements needed. I made it clear at the "Description and Documentation" section.

-- HideyoImazu - 2012-07-13

Accepted in JerusalemReleaseMeeting2012x07x20 to be implemented as a new user mapping manager that replaces the default TWikiUserMapping manager. Introduce conditional so that core, skins, plugins and TWiki apps can be tailored as needed

-- PeterThoeny - 2012-07-21

Edit | Attach | Watch | Print version | History: r13 < r12 < r11 < r10 < r9 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r13 - 2012-10-25 - HideyoImazu
 
  • 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-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.