9cad0b5c0624da1b5d381e2f370bfd238eb32d91
1 # (c) 2003 Centre de Recherche en Informatique ENSMP Fontainebleau <http://cri.ensmp.fr>
2 # (c) 2003 BenoƮt PIN <mailto:pin@cri.ensmp.fr>
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License version 2 as published
6 # by the Free Software Foundation.
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
23 from Globals
import InitializeClass
24 from Products
.CMFCore
.TypesTool
import TypesTool
25 from Products
.CMFCore
.permissions
import ManagePortal
26 from MosaicBlockInformation
import MosaicBlockInformation
27 from AccessControl
import ClassSecurityInfo
30 allowedTypes
= ['Mosaic Block Information']
32 class MosaicTool(TypesTool
):
38 meta_type
= 'Mosaic Tool'
40 def filtered_meta_types(self
, user
=None):
41 # Filters the list of available meta types.
43 for name
in allowedTypes
:
46 all
= TypesTool
.inheritedAttribute('filtered_meta_types')(self
)
48 for meta_type
in self
.all_meta_types():
49 if allowed
.get(meta_type
['name']):
50 meta_types
.append(meta_type
)
54 InitializeClass(MosaicTool
)