Guest
Public paste!

Untitled

By: a guest | Feb 4th, 2010 | Syntax: Python | Size: 0.55 KB | Hits: 130 | Expires: Never
Copy text to clipboard
  1. from AccessControl import Permissions as permissions
  2. from Products.ZenModel.Location import Location
  3. from copy import deepcopy
  4.  
  5. local_factory = deepcopy(Location.factory_type_information)[0]
  6. tab = { 'id'  : 'tabl',
  7.         'name' : 'Tab1',
  8.         'action' : 'tab1',
  9.         'permissions' : (permissions.view,)
  10.       }
  11.  
  12. tab2 = { 'id'  : 'tab2',
  13.         'name' : 'Tab2',
  14.         'action' : 'tab2',
  15.         'permissions' : (permissions.view,)
  16.       }
  17.  
  18. local_factory['actions'] += (tab1, tab2)
  19.  
  20. Location.factory_type_information = (local_factory,)