Forums / General / Extensions and Roles

Extensions and Roles

Author Message

Carlos Revillo

Thursday 22 December 2005 4:39:54 am

Hi. I'm developing a small extension for my porpouses. In function_definition.php of the extension, i have defined to functions. One is called 'add' and the other one is called 'view'.

Now, i want give access to anonymous role to 'add' function but not to 'view' function. I know how to give access to anonymous role to all functions of my extension, but how i can give only to one of them?.

Kristof Coomans

Thursday 22 December 2005 5:36:08 am

The functions you are talking about, are template fetch functions. They are not the same as the policy functions used by the role system.

As far as i know, you can not add policies for fetch functions. You can only assign policies to control module/view access (see http://ez.no/community/forum/developer/limiting_within_viewlist_possible ). Of course, you can check in your fetch functions if the current user has the required policies to use the function.

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Carlos Revillo

Thursday 22 December 2005 5:58:32 am

Thanks a lot. I was wrong about that but what you tell me is enough to solve my problem.

Yet another question related to roles. Let's see. I've created some content (folders, articles and custom content) as administrator. Late, I've created a new user in Editors Group. I logon into the admin interface with this new account and also can create new content and other things, but i can't find the way to edit content created by administrators... This contents does not appears in tree content, by the way. Is this possible?.

Thanks so much.

Kristof Coomans

Friday 23 December 2005 1:02:31 am

Do the users in the Editors group have permission to view the objects?

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Carlos Revillo

Friday 23 December 2005 2:00:42 am

I give editors users access to all functions in content module.
but, as i said before, when i logon as editor i can't see content created by admins.
thanks.