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