You are here: Foswiki>Tasks Web>Item2468 (04 Jan 2015, GeorgeClark)Edit Attach

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.


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);

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.


ItemTemplate edit

Summary isAdmin and isInGroup should have optional user argument
ReportedBy TWiki:Main.MeredithLesly
SVN Range Mon, 05 Jun 2006 build 10479
AppliesTo Engine
Component FoswikiFunc
Priority Enhancement
CurrentState Proposal Required
TargetRelease n/a
ReleasedIn n/a
Topic revision: r7 - 04 Jan 2015, GeorgeClark
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy