Loading...
 
Features / Usability

Features / Usability


permissions for a themes

posts: 27

Hi!

Ho i can apply permissions for a theme? in the tiki-objectpermissions.php only I can assign tiki_p_topic_read but not other permissions to admin this theme.

thank you!

posts: 4644 Japan

> Hi!
>
> Ho i can apply permissions for a theme? in the tiki-objectpermissions.php only I can assign tiki_p_topic_read but not other permissions to admin this theme.

Permissions are assigned for Tiki objects — wiki pages, galleries, article topics, etc. Themes aren't objects, but rather the look of objects. For this reason, it doesn't make sense to apply permissions to a theme. Are you confusing this term with something else? Do you mean "topic"?

I see tiki_p_topic_read as a group permission that can be assigned for article topics on the Admin Group Permissions page, but this has nothing to do with themes. Can you give more details about what you want to do?

-- Gary


posts: 27

> Hi!
>
> Ho i can apply permissions for a theme? in the tiki-objectpermissions.php only I can assign tiki_p_topic_read but not other permissions to admin this theme.
>
> thank you!
>


yes, I translate for the spanish "temas" to "theme", but i can say "topic".

I want to do that only one group can admin the articles for this topis, for example edit, create a new article...

thanks!


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
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
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


posts: 27

> Hi!
>
> Ho i can apply permissions for a theme? in the tiki-objectpermissions.php only I can assign tiki_p_topic_read but not other permissions to admin this theme.
>
> thank you!
>

thanks sylvie! yes I need good luck!


Upcoming Events

No records to display

Menu