bc6b1b667ac6a334dfbba5fa634dc77369fb1a44
[GroupUserFolder.git] / GroupsToolPermissions.py
1 # -*- coding: utf-8 -*-
2 ## GroupUserFolder
3 ## Copyright (C)2006 Ingeniweb
4
5 ## This program is free software; you can redistribute it and/or modify
6 ## it under the terms of the GNU General Public License as published by
7 ## the Free Software Foundation; either version 2 of the License, or
8 ## (at your option) any later version.
9
10 ## This program is distributed in the hope that it will be useful,
11 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 ## GNU General Public License for more details.
14
15 ## You should have received a copy of the GNU General Public License
16 ## along with this program; see the file COPYING. If not, write to the
17 ## Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18
19 ## Copyright (c) 2003 The Connexions Project, All Rights Reserved
20 ## initially written by J Cameron Cooper, 11 June 2003
21 ## concept with Brent Hendricks, George Runyan
22 """
23 Basic usergroup tool.
24 """
25 __version__ = "$Revision: $"
26 # $Source: $
27 # $Id: GroupsToolPermissions.py 30098 2006-09-08 12:35:01Z encolpe $
28 __docformat__ = 'restructuredtext'
29
30 # BBB CMF < 1.5
31 try:
32 from Products.CMFCore.permissions import *
33 except ImportError:
34 from Products.CMFCore.CMFCorePermissions import *
35
36 AddGroups = 'Add Groups'
37 setDefaultRoles(AddGroups, ('Manager',))
38
39 ManageGroups = 'Manage Groups'
40 setDefaultRoles(ManageGroups, ('Manager',))
41
42 ViewGroups = 'View Groups'
43 setDefaultRoles(ViewGroups, ('Manager', 'Owner', 'Member'))
44
45 DeleteGroups = 'Delete Groups'
46 setDefaultRoles(DeleteGroups, ('Manager', ))
47
48 SetGroupOwnership = 'Set Group Ownership'
49 setDefaultRoles(SetGroupOwnership, ('Manager', 'Owner'))