1 | """Rule folder implementation |
---|
2 | |
---|
3 | $Id: $ |
---|
4 | """ |
---|
5 | |
---|
6 | __authors__ = 'Geoff Davis <geoff@geoffdavis.net>' |
---|
7 | __docformat__ = 'restructuredtext' |
---|
8 | |
---|
9 | from AccessControl import ClassSecurityInfo |
---|
10 | |
---|
11 | from Products.CMFCore import permissions |
---|
12 | |
---|
13 | from Products.Archetypes.atapi import OrderedBaseFolder |
---|
14 | from Products.Archetypes.atapi import registerType |
---|
15 | |
---|
16 | from Products.CacheSetup.interfaces import ICacheToolFolder |
---|
17 | from Products.CacheSetup.config import PROJECT_NAME |
---|
18 | from nocatalog import NoCatalog |
---|
19 | |
---|
20 | |
---|
21 | class RuleFolder(NoCatalog, OrderedBaseFolder): |
---|
22 | """A container for rule objects""" |
---|
23 | |
---|
24 | __implements__ = (OrderedBaseFolder.__implements__, ICacheToolFolder) |
---|
25 | |
---|
26 | security = ClassSecurityInfo() |
---|
27 | archetype_name = 'Rule Folder' |
---|
28 | portal_type = meta_type = 'RuleFolder' |
---|
29 | global_allow = 0 |
---|
30 | allowed_content_types = ('ContentCacheRule','TemplateCacheRule','PolicyHTTPCacheManagerCacheRule') |
---|
31 | |
---|
32 | actions = ( |
---|
33 | {'action': 'string:$object_url', |
---|
34 | 'category': 'object', |
---|
35 | 'id': 'view', |
---|
36 | 'name': 'Cache Setup', |
---|
37 | 'permissions': (permissions.ManagePortal,), |
---|
38 | 'visible': False}, |
---|
39 | ) |
---|
40 | |
---|
41 | aliases = { |
---|
42 | '(Default)': 'cache_policy_item_config', |
---|
43 | 'view' : 'cache_policy_item_config', |
---|
44 | 'edit' : 'cache_policy_item_config' |
---|
45 | } |
---|
46 | |
---|
47 | registerType(RuleFolder, PROJECT_NAME) |
---|