Back to index

plone3  3.1.7
GroupsToolPermissions.py
Go to the documentation of this file.
00001 # -*- coding: utf-8 -*-
00002 ## GroupUserFolder
00003 ## Copyright (C)2006 Ingeniweb
00004 
00005 ## This program is free software; you can redistribute it and/or modify
00006 ## it under the terms of the GNU General Public License as published by
00007 ## the Free Software Foundation; either version 2 of the License, or
00008 ## (at your option) any later version.
00009 
00010 ## This program is distributed in the hope that it will be useful,
00011 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 ## GNU General Public License for more details.
00014 
00015 ## You should have received a copy of the GNU General Public License
00016 ## along with this program; see the file COPYING. If not, write to the
00017 ## Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00018 
00019 ## Copyright (c) 2003 The Connexions Project, All Rights Reserved
00020 ## initially written by J Cameron Cooper, 11 June 2003
00021 ## concept with Brent Hendricks, George Runyan
00022 """
00023 Basic usergroup tool.
00024 """
00025 __version__ = "$Revision:  $"
00026 # $Source:  $
00027 # $Id: GroupsToolPermissions.py 30098 2006-09-08 12:35:01Z encolpe $
00028 __docformat__ = 'restructuredtext'
00029 
00030 # BBB CMF < 1.5
00031 try:
00032     from Products.CMFCore.permissions import *
00033 except ImportError:
00034     from Products.CMFCore.CMFCorePermissions import *
00035 
00036 AddGroups = 'Add Groups'
00037 setDefaultRoles(AddGroups, ('Manager',))
00038 
00039 ManageGroups = 'Manage Groups'
00040 setDefaultRoles(ManageGroups, ('Manager',))
00041 
00042 ViewGroups = 'View Groups'
00043 setDefaultRoles(ViewGroups, ('Manager', 'Owner', 'Member'))
00044 
00045 DeleteGroups = 'Delete Groups'
00046 setDefaultRoles(DeleteGroups, ('Manager', ))
00047 
00048 SetGroupOwnership = 'Set Group Ownership'
00049 setDefaultRoles(SetGroupOwnership, ('Manager', 'Owner'))