We installed Tiki with version 1.9 and we quickly installed the PluginInclude and starting making extensive use of it. This week, we upgraded to 2.2 and some of the includes stopped working.
After some trial and error, it appears to be the 3rd to 4th include on a page (all pages have the same permissions via categories) that fails. It works for admin, but not the average user.
I took a look at the plugin and found the line
// $text="<b>User $user has no permission to access $page</b><br />";
and uncommented it. The user received the message that they did not have permission.
After poking around in the code for a bit to see how get_perm_object was used elsewhere, I found user_has_perm_on_object, so I tried swapping out the function:
In wikiplugin_include.php, I changed
$perms = $tikilib->get_perm_object($page, 'wiki page', $data, false);
if ($perms'tiki_p_view' != 'y') {
to
if ( ! $tikilib->user_has_perm_on_object($user,$page,'wiki page','tiki_p_view') ) {
Everything now works as it did before the upgrade. I even changed the category to deny access to the user on the included page that was originally and it failed properly.
I don't know if get_perm_object is obsolete or has a bug in it, but user_has_perm_on_object works fine.
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.
Unable to connect to show.tikiwiki.org. Please let us know of the problem so that we can do something about it. Thanks.
filename | created | hits | comment | version | filetype | ||
---|---|---|---|---|---|---|---|
No attachments for this item |