Loading...
 
Skip to main content

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
(0)
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+
Demonstrate Bug (older Tiki versions)
Ticket ID
3998
Created
Thursday 29 September, 2011 11:10:15 UTC
by fhkd
LastModif
Thursday 02 July, 2026 10:20:12 UTC


Show PHP error messages