• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Currently they only check the current user, but plugins might well need to check for other users as well.


Do you mean TWiki::Func::isAdmin? Because in the core, these are methods on a user object.

CC

while i don't really want to puritanical

I guess you mean you'd like to call TWiki::User::isAdmin(nameOfUser) rather than

my $user = TWiki::User::Finduser(nameOfUser);
$user->isAdmin();

now something in me thinks this is not necessarily worth it - the execution cost will be the same, and as a programatical short cut, i'm not sure it will be tyed often enough.

aren't we glad this is only my opinion?

-- SD

No, I want to call TWiki::FuncUsersContrib::isAdmin($user) from a plugin. Currently it doesn't take an argument and only checks for the current user.

ML

ItemTemplate
Summary isAdmin and isInGroup should have optional user argument
ReportedBy TWiki:Main.MeredithLesly
Codebase ~twiki4
SVN Range Mon, 05 Jun 2006 build 10479
AppliesTo Engine
Component

Priority Enhancement
CurrentState New
WaitingFor

Checkins

TargetRelease n/a
Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r5 - 2006-06-17 - MeredithLesly
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback