Watch structures from wiki pages - permission denied
- Status
- Closed
- Subject
- Watch structures from wiki pages - permission denied
- Version
- 4.x
- Category
- Error
- Patch
- Feature
- Wiki (page view, edit, history, rename, etc)
Watch (email notifications of changes)
Wiki Structure (book & table of content) - Resolution status
- Fixed or Solved
- Submitted by
- herzrein
- Volunteered to solve
- Arild Berg
- Lastmod by
- Arild Berg
- Rating
- Description
When on a wiki page on my tiki, I have the options available to watch the specific page or to "Monitor the sub-structure". When clicking on the latter, I am redirected to a permission denied page and the watch for the sub-structure is not set.
Even admin is being denied the permission to set a sub-structure watch on a wiki page.
Setting a watch on a sub-structure inside the structure-admin menu works fine for any permitted, though.
- Solution
On version 4.1 the following code can be found in tiki-index.php line number 411:
Copy to clipboardif (($_REQUEST['watch_action'] == 'add_desc' || $_REQUEST['watch_action'] == 'remove_desc') && $objectperms->watch_structure ) { $access->display_error( $page, tra('Permission denied'), '403'); }If i am not mistaken, $objectperms->watch_structure should return true, if the rights are given to watch the structure. So having the rights AND requesting a watch will result in permission denied, which is basicly the opposite of the intended.
The following code works for me an should be the appropriate fix (as mentioned, if I am not mistaken).
Copy to clipboardif (($_REQUEST['watch_action'] == 'add_desc' || $_REQUEST['watch_action'] == 'remove_desc') && !$objectperms->watch_structure ) { $access->display_error( $page, tra('Permission denied'), '403'); }$objectperms->watch_structure simply negated.
- Importance
- 5
- Priority
- 25
- Demonstrate Bug on Tiki 19+
-
This bug has been demonstrated on show2.tiki.org
Please demonstrate your bug on show2.tiki.org
Show.tiki.org is not configured properlyThe public/private keys configured to connect to show2.tiki.org were not accepted. Please make sure you are using RSA keys. Thanks.
- Demonstrate Bug (older Tiki versions)
-
This bug has been demonstrated on show.tikiwiki.org
Please demonstrate your bug on show.tikiwiki.org
Show.tiki.org is not configured properlyThe public/private keys configured to connect to show.tikiwiki.org were not accepted. Please make sure you are using RSA keys. Thanks.
- Ticket ID
- 2985
- Created
- Thursday 14 January, 2010 11:34:23 UTC
by herzrein - LastModif
- Saturday 03 September, 2011 23:00:46 UTC