[Erp5-dev] "Hiding" modules

Yoshinori Okuji yo at nexedi.com
Fri Mar 23 03:54:28 CET 2007


On Friday 16 March 2007 13:50, Jacek Medrzycki wrote:
> I tried to play with permissions, but It seems that if a user has no
> permission to view and access the Person Module, he is not able to
> access Person, even if
> he has permissions to this particular Person (not very surprising). The
> question is: Is there a combination of permissions that hides the module
> from the modules dropdown but allowes user to access the object
> contained in the module?

In theory, you can only disable the View permission. The problem looks like 
the generation of breadcrumbs uses Title, and Title is protected with View. 
You can do something like this in breadcrumbs:

        if hasattr(obj, 'Title'):
            title = obj.Title()
        else:
            title = 'XXX'
        result.append( { 'id'      : now[ -1 ]
                       , 'title'   : title
                       , 'url'     : '%s/%s/view' % (portal_url, 
'/'.join(now))
                       }
                    )

YO
-- 
Yoshinori Okuji, Nexedi CTO
Nexedi: Consulting and Development of Free / Open Source Software
http://www.nexedi.com
ERP5: Full Featured High End Open Source ERP
http://www.erp5.com
ERP5 Wiki: Developer Zone for ERP5 Community
http://www.erp5.org



More information about the Erp5-dev mailing list