Re: [Zope-dev] Re: __ac_permissions__ question

2000-08-21 Thread Chris Withers

Shane Hathaway wrote:
  __ac_permissions__ = Posting.__ac_permissions__ + (
  ('View', ['prev_item','next_item','showSummary','desc_items'],
  ('Anonymous', 'Manager')),
  )
 
 You don't need to concatenate the permissions of the base classes.
 default__class_init__ will pick them up.

Now that I've got it in there ;-)

  and Posting.__ac_permissions__ also defines a 'View' permission, which
  methods are covered?
 
 Assertions made on a method in a subclass override the assertions made
 in the base class.

Okay, Posting has the following list of methods for the 'view'
permission:
['date_posted','body_len','date_created','time_created','attachment','thread_path','index_html','showBody',
 
'desc_items','dupString','striptags','tpId','tpURL','this','has_items','thread','title','author','body',
  'email','subject']

Now, what I want to do is add the following methods to this list for the
Article class which subclasses Posting:
['prev_item','next_item','showSummary','desc_items']

How do I do that? 

cheers,

Chris

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] Re: __ac_permissions__ question

2000-08-21 Thread Shane Hathaway

Chris Withers wrote:
 Okay, Posting has the following list of methods for the 'view'
 permission:
 
['date_posted','body_len','date_created','time_created','attachment','thread_path','index_html','showBody',
 
 
'desc_items','dupString','striptags','tpId','tpURL','this','has_items','thread','title','author','body',
   'email','subject']
 
 Now, what I want to do is add the following methods to this list for the
 Article class which subclasses Posting:
 ['prev_item','next_item','showSummary','desc_items']
 
 How do I do that?

class Article:

  __ac_permissions__ = (
('View', ('prev_item', 'next_item', 'showSummary', 'desc_items')),
)

  ... etc ...

Globals.default__class_init__(Article)

This should work as expected.  Security assertions are inherited except
when overridden.

BTW did getSubject() solve your other problem?  I'm not sure irc is
going to work again.  "irc.openprojects.net" seems to be too busy.

Shane

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )