Features / Usability

Features / Usability

Re: Re: Category tiki_p_edit permission are not applied while creating page.

posts: 8311 Israel

Hi Torsten,

What you said is not true.

By reading the comment in the code and the documentation this use case has being foreseen and it should work.

In admin group you can set; "Default category assigned to uncategorized objects edited by a user with this default group:" (and of course i have set it).

So the category is known which mean that in my case the perm are set by the moment the user from this group is known even before the page is saved.

In the code of tiki-editpage.php there is a lot of comment and function about "guessing" the under-creation page properties. This as been especially in the case of user adding page via Structures.

Not sure you have check the code but just to give you an idea.

"// This is a new page being created. See if we can guess some of its attributes"

"//Is new page to be inserted into structure?"

"//Page may have been inserted from a structure page view

"// Inherit direct object permissions for pages added to a structure, if the user can edit the structure and the page


The fact that we have a tiki_p_edit perm (create and edit page) in category is also self-explanary. :-)

From what i see a check is missing and the condition on line 146 is preventing the conditions coming afterward about granting perm to a user to edit/create a page. (maybe something around line 1101).