Changeset 57 for waeup_product/trunk/Extensions/install.py
- Timestamp:
- 19 Oct 2005, 09:42:03 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
waeup_product/trunk/Extensions/install.py
r49 r57 52 52 'category' : 'object', 53 53 } 54 self.deleteActions({'portal_ discussion': ['activate_comments',]})54 self.deleteActions({'portal_subscriptions': ['activate_comments',]}) 55 55 self.verifyAction('portal_subscriptions', **action) 56 # now portal_discussion 57 self.deleteActions({'portal_discussion': ['comment', 58 'activate_comments', 59 'deactivate_comments', 60 'manage_comments']}) 61 action = {'id' : 'comment', 62 'name': 'action_comment', 63 'action': "string:${object/absolute_url}/post_comment", 64 'condition' : "python:getattr(object.getContent(), 'allow_discussion' , None) and object.hasCommentAction()", 65 'permission': (View,), 66 'category' : 'object', 67 } 68 self.verifyAction('portal_discussion', **action) 69 action = {'id' : 'activate_comments', 70 'name': 'action_activate_comments', 71 'action': "string:${object/absolute_url}/set_comment_mode?mode=1", 72 'condition' : "python:getattr(object.getTypeInfo(),'cps_proxy_type','') in ('document', 'folderishdocument') and getattr(object.getContent(), 'allow_discussion' , None) == 1", 73 'permission': (ForumManageComments,), 74 'category' : 'object', 75 } 76 self.verifyAction('portal_discussion', **action) 77 action = {'id' : 'deactivate_comments', 78 'name': 'action_deactivate_comments', 79 'action': "string:${object/absolute_url}/set_comment_mode?mode=0", 80 'condition' : "python:getattr(object.getTypeInfo(),'cps_proxy_type','') in ('document', 'folderishdocument') and getattr(object.getContent(), 'allow_discussion' , None) == 1", 81 'permission': (ForumManageComments,), 82 'category' : 'object', 83 } 84 self.verifyAction('portal_discussion', **action) 85 action = {'id' : 'manage_comments', 86 'name': 'action_manage_comments', 87 'action': "string:${object/absolute_url}/manage_comment", 88 'condition' : "python:getattr(object.getTypeInfo(),'cps_proxy_type','') in ('document', 'folderishdocument') and getattr(object.getContent(), 'allow_discussion' , None) == 1", 89 'permission': (ForumManageComments,), 90 'category' : 'object', 91 } 92 self.verifyAction('portal_discussion', **action) 56 93 57 94 ########################################## … … 129 166 self.verifyFlexibleTypes(dtypes) 130 167 self.allowContentTypes('University', ('Workspace','Section',)) 131 #self.allowContentTypes('Student', ('Workspace', 'Section'))132 ## ptypes = {133 ## 'University' : {134 ## 'allowed_content_types': ('StudentsFolder',),135 ## 'typeinfo_name': 'University',136 ## 'add_meta_type': 'Factory-based Type Information',137 ## },138 ## 'StudentsFolder' : {139 ## 'allowed_content_types': ('Student',),140 ## 'typeinfo_name': 'StudentFolder',141 ## 'add_meta_type': 'Factory-based Type Information',142 ## },143 ## 'Student' : {144 ## 'allowed_content_types': ('Jamb',),145 ## 'typeinfo_name': 'Student',146 ## 'add_meta_type': 'Factory-based Type Information',147 ## },148 ## }149 ## self.verifyContentTypes(ptypes)150 168 ########################################## 151 169 # Schemas
Note: See TracChangeset for help on using the changeset viewer.