Loading...
 
Features / Usability

Features / Usability


Re: permissions for a themes

posts: 1092

You have only a tiki_p_topic_read on a topic that you can manage from articles->admin->topic->perms
If you use category for an article, it is the same, you have tiki_p_view_categories. The tiki_p_edit_categories is still in dev on 1.10 (a little scare to commit). So far I knwo you can't do that
But adding a permission in tikiwiki is very simple you have only to add a line like this in your database

Image
Copy to clipboard
INSERT INTO users_permissions (permName, permDesc, level, type) VALUES ('tiki_p_topic_edit', 'Can edit a topic (Applies only to individual topic perms)', 'registered', 'cms');

THen in tiki-edit_article.php after you gat the topic

Image
Copy to clipboard
if ($tiki_p_admin != 'y' && $userlib->object_has_one_permission($article_data["topicId"], 'topic')) { if (!$userlib->object_has_permission($user, $article_data["topicId"], 'topic', 'tiki_p_topic_edit')) { $smarty->assign('msg', tra("Permision denied")); $smarty->display("error.tpl"); die; } }


And then you have to limit the topic list by the same way

Code with no garantee, good luck
sylvie

There are no comments at this time.