[BlueBream] security on links

Adam GROSZER agroszer at gmail.com
Sun Jul 25 04:50:31 EDT 2010


Hello Justin,

browser:menu is rather ancient, I won't use it anymore.
Current menu stuff is better done with viewlets, they manage security
well too.

If your task is not about a menu, you can check perm with:

        if zope.security.management.thread_local.interaction.checkPermission(
            'your.permisson-id', self.context):

Sunday, July 25, 2010, 9:50:42 AM, you wrote:

CC> Le 25/07/2010 03:15, Justin Ryan a écrit :
>> Hiya..
>>
>> I want to restrict some links to display only for principals with access
>> to the link target, e.g. an add, edit, admin page, based on permissions.
>>
>> For the life of me, I can't find an example of this.. Any pointers would
>> be helpful.

CC> I'm not sure, but I remember that there is some such feature in the browser:menu
CC> ZCML directive. If the user doesn't have the permission, the link is not
CC> displayed. Otherwise you can implement this in a viewlet or content provider.

CC> Christophe

>>
>>
>>
>> _______________________________________________
>> bluebream mailing list
>> bluebream at zope.org
>> https://mail.zope.org/mailman/listinfo/bluebream

CC> _______________________________________________
CC> bluebream mailing list
CC> bluebream at zope.org
CC> https://mail.zope.org/mailman/listinfo/bluebream


-- 
Best regards,
 Adam GROSZER                            mailto:agroszer at gmail.com
--
Quote of the day:
What sin has not been committed in the name of efficiency?



More information about the bluebream mailing list