Re: [Zope3-Users] Getting permissions for a class

2009-01-15 Thread Laurent Mignon

Dan Korostelev wrote:
> You may want to check out the
> zope.security.checker.getCheckerForInstancesOf function that takes
> class as argument and return a security checker that is in this case
> an instance of zope.security.checker.Checker. It has get_permissions
> and set_permissions dictionaries and some helpful methods to quickly
> check needed permissions.
> 
Thanks !!!  That work
> 2009/1/15 Laurent Mignon :
>> Laurent Mignon wrote:
>>> Hi,
>>>
>>> I need to retrieve the permissions list on a class. How can I do.
>>>
>>> I've a class LegisltavePeriod and I'v written the following lines in my
>>> zcml:
>>>
>> Sorry for the typo into the directive (the question remain)
>>>   
>> 
>>> >> id="tabellio.legislativeperiod"
>>> title="Add a legislative period"/>
>>> >> permission="tabellio.legislativeperiod.legislativeperiod.Manage"
>>> set_schema=".interfaces.ILegislativePeriod"
>>> />
>>> >> permission="zope.View"
>>> interface=".interfaces.ILegislativePeriod"
>>> />
>>> 
>>>
>>> How can I get the list of permissions declared for my LegislativePeriod.
>>>
>>> Thanks,
>>>
>>> sagblmi
>> ___
>> Zope3-users mailing list
>> Zope3-users@zope.org
>> http://mail.zope.org/mailman/listinfo/zope3-users
>>
> 
> 
> 

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Getting permissions for a class

2009-01-15 Thread Dan Korostelev
You may want to check out the
zope.security.checker.getCheckerForInstancesOf function that takes
class as argument and return a security checker that is in this case
an instance of zope.security.checker.Checker. It has get_permissions
and set_permissions dictionaries and some helpful methods to quickly
check needed permissions.

2009/1/15 Laurent Mignon :
> Laurent Mignon wrote:
>> Hi,
>>
>> I need to retrieve the permissions list on a class. How can I do.
>>
>> I've a class LegisltavePeriod and I'v written the following lines in my
>> zcml:
>>
> Sorry for the typo into the directive (the question remain)
>>   
> 
>> > id="tabellio.legislativeperiod"
>> title="Add a legislative period"/>
>> > permission="tabellio.legislativeperiod.legislativeperiod.Manage"
>> set_schema=".interfaces.ILegislativePeriod"
>> />
>> > permission="zope.View"
>> interface=".interfaces.ILegislativePeriod"
>> />
>> 
>>
>> How can I get the list of permissions declared for my LegislativePeriod.
>>
>> Thanks,
>>
>> sagblmi
>
> ___
> Zope3-users mailing list
> Zope3-users@zope.org
> http://mail.zope.org/mailman/listinfo/zope3-users
>



-- 
WBR, Dan Korostelev
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Getting permissions for a class

2009-01-15 Thread Laurent Mignon
Laurent Mignon wrote:
> Hi,
> 
> I need to retrieve the permissions list on a class. How can I do.
> 
> I've a class LegisltavePeriod and I'v written the following lines in my 
> zcml:
>
Sorry for the typo into the directive (the question remain)
>   
 
>  id="tabellio.legislativeperiod"
> title="Add a legislative period"/>
>  permission="tabellio.legislativeperiod.legislativeperiod.Manage"
> set_schema=".interfaces.ILegislativePeriod"
> />
>  permission="zope.View"
> interface=".interfaces.ILegislativePeriod"
> />
> 
> 
> How can I get the list of permissions declared for my LegislativePeriod.
> 
> Thanks,
> 
> sagblmi

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Getting permissions for a class

2009-01-15 Thread Laurent Mignon
Hi,

I need to retrieve the permissions list on a class. How can I do.

I've a class LegisltavePeriod and I'v written the following lines in my 
zcml:

  





How can I get the list of permissions declared for my LegislativePeriod.

Thanks,

sagblmi

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users