Wiki pages links are case insensitive but the category permission check for wiki pages menu entry only works if the case of the link matches the case of the wiki page name.
Say you have a wiki page called "Foo" and the "Registered" group has view permission to this page granted by a category. If you create a menu entry linking to the "Foo" page and set the URL as "Foo" everything will work as expected. But if you set the URL as "foo" the menu option will not appear to the users of the "Registered" group. Obviously for this to happen the "Registered" group must not have global tiki_p_view.
This does not happen if object permissions, instead of category permissions, grant access to the "Foo" page.
http://tikiwiki.svn.sourceforge.net/viewvc/tikiwiki?view=rev&revision=27364
The following patch (also attached) permanently fix the issue.
The method Perms_ResolverFactory_CategoryFactory::bulkLoadCategories() loads the property Perms_ResolverFactory_CategoryFactory::knownObjects with the list of objects and the categories they belong. The problem is that it does that by comparing the object name (in the case of menu options, the URL menu option value) with the itemId field of the table 'tiki_objects' in a case sensitive way. So it ends up loading a incomplete list of known objects.
Index: lib/core/lib/Perms/ResolverFactory/CategoryFactory.php =================================================================== --- lib/core/lib/Perms/ResolverFactory/CategoryFactory.php (revision 27307) +++ lib/core/lib/Perms/ResolverFactory/CategoryFactory.php (working copy) @@ -95,7 +95,7 @@ $key = $this->objectKey( array_merge( $baseContext, array( 'object' => $v ) ) ); if( ! isset( $this->knownObjects[$key] ) ) { - $objects[$v] = $key; + $objects[strtolower($v)] = $key; $this->knownObjects[$key] = array(); } } @@ -112,7 +112,7 @@ foreach( $result as $row ) { $category = (int) $row['categId']; - $object = $row['itemId']; + $object = strtolower($row['itemId']); $key = $objects[$object]; $this->knownObjects[$key][] = $category;
To help developers solve the bug, we kindly request that you demonstrate your bug on a show2.tiki.org instance. To start, simply select a version and click on "Create show2.tiki.org instance". Once the instance is ready (in a minute or two), as indicated in the status window below, you can then access that instance, login (the initial admin username/password is "admin") and configure the Tiki to demonstrate your bug. Priority will be given to bugs that have been demonstrated on show2.tiki.org.
To help developers solve the bug, we kindly request that you demonstrate your bug on a show.tikiwiki.org instance. To start, simply select a version and click on "Create show.tikiwiki.org instance". Once the instance is ready (in a minute or two), as indicated in the status window below, you can then access that instance, login (the initial admin username/password is "admin") and configure the Tiki to demonstrate your bug. Priority will be given to bugs that have been demonstrated on show.tikiwiki.org.