Feature Proposal: getEffectiveUser() and getRealUser() in TWiki::Users

Motivation

When user masquerading is in action, you may need to get the effective user and real user.

Description and Documentation

TWiki::Users will have getEffectiveUser($cUID) and getRealUser($cUID) methods, which return the effective and real canonical UIDs respectively while user masquerading is in effect.

Those methods check if the user handler for $cUID has getEffectiveUser() and getRealUser() methods. If those methods exist, they are called and the result is returned. Otherwise, $cUID is returned.

Examples

Let's assume

  • The user mapping handler supports TWikibug:TWiki.UserMasquerading.
  • JaneSmith is masquerading as JoeSchmoe.
    • The current wikiname is JaneSmithOnBehalfOfJoeSchmoe - the user mapping handler is implemented as such
  • DynamicAccessControl is used
    • Topics a user can edit is listed on the Canedit form field of the user's profile topic named Profile%WIKINAME%, e.g. ProfileJaneSmith.

ALLOWWEBCHANGE would be set as follows.

 * Set ALLOWWEBCHANGE = %IF{"%CALCULATE{$SEARCH(\b%TOPIC%\b, %FORMFIELD{"Canedit" topic="Profile%WIKINAME%"}%)"}%" then="%WIKINAME% else="nobody"}%

For the dynamic access control to work even in user masquerading, %WIKINAME% in ALLOWWEBCHANGE needs to be expanded to the effective user's wiki name (JoeSchmoe) instead of the masqueraded identity (JaneSmithOnBehalfOfJoeSchmoe).

For this, there needs to be a way to get the effective user.

Impact

Implementation

-- Contributors: Hideyo Imazu - 2013年03月25日

Discussion

This feature is accepted by JerusalemReleaseMeeting2013x03x29

-- Peter Thoeny - 2013年03月29日

Edit | Attach | (削除) Watch (削除ここまで) | Print version | History : r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r5 - 2013年09月19日 - PeterThoeny
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.

AltStyle によって変換されたページ (->オリジナル) /