# -*- coding: utf-8 # Copyright 2006 by Meelis Mets from Products.Archetypes.public import BaseSchema, Schema from Products.Archetypes.public import FileField from Products.Archetypes.public import FileWidget from Products.Archetypes.public import BaseContent, registerType from Globals import InitializeClass from Products.CMFCore.utils import getToolByName from AccessControl import ClassSecurityInfo, Unauthorized from config import PROJECT_NAME from Common import CommonMix schema = BaseSchema class Groups(BaseContent, CommonMix): """ Groups """ meta_type = "Groups" archetype_name = "Groups" global_allow = 0 exclude_from_nav = True filter_content_types = True allowed_content_types = () security = ClassSecurityInfo() schema = schema actions = ( { 'id':'view', 'name':'View', 'action':'string:${object_url}/groups_view', 'permissions': ('View',), }, { 'id':'edit', 'name':'Edit', 'action':'string:${object_url}/base_edit', 'permissions': ('Access Denied',), }, { 'id':'metadata', 'name':'Properties', 'action':'string:${object_url}/base_metadata', 'permissions': ('Access Denied',), }, ) aliases = { '(Default)' : '', 'view' : 'drawer_view', 'edit' : 'base_edit', } def __init__(self, id): self.id = id self.largeIcon = "groups.gif" def getLargeIcon(self): """ returns large icon name """ return self.largeIcon registerType(Groups, PROJECT_NAME)