Item9793: DIfferent behaviour with IF statement and 'ingroup'

pencil
Priority: Normal
Current State: Closed
Released In: n/a
Target Release: n/a
Applies To: Engine
Component:
Branches:
Reported By: TobiasVonDerKrone
Waiting For:
Last Change By: TobiasVonDerKrone
Since the new install of Foswiki 1.1.0 I have a different/strange behaviour when using IF statement and checking group membership. We have apache login with kerberos so our login names look like username@KERBEROSREALM. In previous releases we tested group membership:
%IF{"'%WIKINAME%' ingroup 'AdminGroup'" then="is admin" else="is no admin" }%
Now, this does not work anymore and I have to test it:
%IF{"'%USERNAME%' ingroup 'AdminGroup'" then="is admin" else="is no admin" }%

I created a test topic (in my local environment) as follows:
   * WIKINAME: %WIKINAME%
   * USERNAME: %USERNAME%

| *Who* | *Group* | *in?* |
| %WIKINAME% | AdminGroup | %IF{"'%WIKINAME%' ingroup 'AdminGroup'" then="yes" else="no" }% |
| %WIKINAME% | Main.AdminGroup | %IF{"'%WIKINAME%' ingroup 'Main.AdminGroup'" then="yes" else="no" }% |
| %USERNAME% | AdminGroup | %IF{"'%USERNAME%' ingroup 'AdminGroup'" then="yes" else="no" }% |
| %USERNAME% | Main.AdminGroup | %IF{"'%USERNAME%' ingroup 'Main.AdminGroup'" then="yes" else="no" }% |
with the following result: foswiki wikiname username.png

In the IfStatements docu there is the USERNAME example mentioned, but shouldn't it work also with WIKINAME?

What is going wrong here? Is it (my) user error?

-- TobiasVonDerKrone - 05 Oct 2010

New state,

in 1.1.3 the user TobiasVonDerKrone is member of AdminGroup and all works as expected.

-- TobiasVonDerKrone - 15 Jun 2011
 

ItemTemplate edit

Summary DIfferent behaviour with IF statement and 'ingroup'
ReportedBy TobiasVonDerKrone
Codebase 1.1.3, 1.1.0
SVN Range
AppliesTo Engine
Component
Priority Normal
CurrentState Closed
WaitingFor
Checkins
TargetRelease n/a
ReleasedIn n/a
I Attachment Action Size Date Who Comment
foswiki_wikiname_username.pngpng foswiki_wikiname_username.png manage 30 K 05 Oct 2010 - 14:07 TobiasVonDerKrone test topic view
Topic revision: r2 - 15 Jun 2011, TobiasVonDerKrone
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