Item9793: DIfferent behaviour with IF statement and 'ingroup'
Priority: Normal
Current State: Closed
Released In: n/a
Target Release: n/a
Applies To: Engine
Component:
Branches:
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:
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