User with permission tiki_p_edit in a certain categorie is not allowed to add a page in a structure assigned to that structure.
- Status
- Closed
- Subject
- User with permission tiki_p_edit in a certain categorie is not allowed to add a page in a structure assigned to that structure.
- Version
- 6.x
- Category
- Conflict of two features (each works well independently)
- Feature
- Category
Wiki Structure (book & table of content) - Resolution status
- Fixed or Solved
- Submitted by
- Ushindi Gedeon
- Lastmod by
- Ushindi Gedeon
- Rating
- Description
I defined a category Helpdesk and assigned it to a structure Helpdesk FAQ.
Also i defined a group Helpdeskadmin, which useres should be able to add new pages to the structure.
Now if a helpdeskadmin try to Add a page to the structure (with the button on the top of the wikipage with the toc), he must have global permission tiki_p_edit, not only for that categorie.
My analysis:In tiki-editpage.php there are to permission tests:
First:
// Permissions
$tikilib->get_perm_object($page, 'wiki page', $info, true);
if ($tiki_p_edit !== 'y') {
...
$smarty->assign('errortype', 401);
$smarty->assign('msg', tra("You do not have permission to edit this page."));
$smarty->display("error.tpl");
die;
}Second:
//Is new page to be inserted into structure?
if $_REQUEST%22current_page_id%22 {
...
$structure_info = $structlib->s_get_structure_info($_REQUEST'current_page_id');
if ( ($tiki_p_edit != 'y' && !$tikilib->user_has_perm_on_object($user,$structure_info%22pageName%22,'wiki page','tiki_p_edit')) || $tiki_p_edit_structures != 'y' && !$tikilib->user_has_perm_on_object($user,$structure_info%22pageName%22,'wiki page','tiki_p_edit_structures' ) ) {
$smarty->assign('errortype', 401);
$smarty->assign('msg', tra("You do not have permission to edit this page."));
$smarty->display("error.tpl");
die;
}The first one is the problem becaus it asks only for globel permission, i think.
- Solution
- Perhaps the first permission test can also ask for the permission defined in structure or categorie?
- Workaround
- 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
- 3998
- Created
- Thursday 29 September, 2011 11:10:15 UTC
by fhkd - LastModif
- Thursday 02 July, 2026 10:20:12 UTC