#3068: Extensible Attachments
-------------------------------------------------------------+--------------
 Reporter:  Pedro Algarvio, aka, s0undt3ch <[EMAIL PROTECTED]>  |        Owner: 
 cboos   
     Type:  enhancement                                      |       Status:  
assigned
 Priority:  normal                                           |    Milestone:  
0.11    
Component:  general                                          |      Version:  
0.9.5   
 Severity:  normal                                           |   Resolution:    
      
 Keywords:                                                   |  
-------------------------------------------------------------+--------------
Comment (by athomas):

 How about this patch? Adds the following interface:

 {{{
 #!python
 class IAttachmentPointProvider(Interface):
     def get_attachment_points():
         """Provide details on file attachment points provided by this
         component.  Returns an iterable of tuples in the form `(type,
         description, title, (view_perm, write_perm, delete_perm))`.
         `description` and `title` will be used as the formatting string
 for the
         attachment point identifier."""
 }}}

 Here's the ticket implementation:

 {{{
 #!python
     def get_attachment_points(self):
         yield ('ticket', 'Ticket #%s', '#%s',
                ('TICKET_VIEW', 'TICKET_APPEND', 'TICKET_ADMIN'))
 }}}

-- 
Ticket URL: <http://projects.edgewall.com/trac/ticket/3068>
The Trac Project <http://trac.edgewall.com/>
_______________________________________________
Trac-Tickets mailing list
[email protected]
http://lists.edgewall.com/mailman/listinfo/trac-tickets

Reply via email to