

At first glance this looked like Item2471, however, the symptoms are different, so I'm opening an extra item.

Every single of the RegisterTests fails in DEVELOP, but the informative message is from the first test case:

1) /cygdrive/c/public_html/_svn_Dakar/DEVELOP/test/unit/RegisterTests.pm:107 - test_bulkRegister(RegisterTests)
AccessControlException: Access to CHANGE TemporaryRegisterTestsSystemWeb.WebPreferences for TestAdmin is denied. access not allowed on topic
The rest is gibberish because this error happens in set_up, so the test cases won't tear_down and leave temporary stuff where it shouldn't be.

The error is due to the removal of apparently "redundant" lines in lib/TWiki/Users.pm in Item2389, r10393. Revert that change and the RegisterTests pass.

Technical Details:
The RegisterTests do their stuff in copies of the actual TWiki webs, which are created during the set_up phase. Among others, the TWiki web is copied. However, copying a web implies patching its WebPreferences. In the case of the TWiki web, where change is restricted to admins, only an admin can store the modified topic. The register tests take that into account and create a TestAdmin before copying the TWiki web, yet the operation fails, because TestAdmin is not recognized as admin.

And here's where the "redundant" lines come into play: The access control in TWiki.WebPreferences is stating:

      * Set ALLOWTOPICCHANGE = %MAINWEB%.TWikiAdminGroup
However, when evaluating the access rights the %MAINWEB% variable is never expanded (and if, it would have a wrong value in the test cases because the constant tag is defined before the users web in the config is changed). Killing %MAINWEB% from the access control definition had been done by one of the redundant lines.

For the moment I'm just reverting the patch of Item2389/r10393 though I agree with Meredith that the code is smelly.

Summary RegisterTests fail in DEVELOP
ReportedBy TWiki:Main.HaraldJoerg
Codebase ~develop
SVN Range 10393-HEAD
AppliesTo Engine

Priority Normal
CurrentState Closed

Checkins 10629
TargetRelease n/a
Topic revision: r4 - 2006-06-17 - HaraldJoerg
Ideas, requests, problems regarding TWiki? Send feedback