comparison roundup/admin.py @ 929:f3e978888cb8

include info about new user roles
author Richard Jones <richard@users.sourceforge.net>
date Thu, 01 Aug 2002 01:07:37 +0000
parents 23c9d4f86380
children c67297b55a34
comparison
equal deleted inserted replaced
928:23c9d4f86380 929:f3e978888cb8
14 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 14 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
15 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" 15 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS"
16 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, 16 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
17 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 17 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
18 # 18 #
19 # $Id: admin.py,v 1.20 2002-08-01 00:56:22 richard Exp $ 19 # $Id: admin.py,v 1.21 2002-08-01 01:07:37 richard Exp $
20 20
21 import sys, os, getpass, getopt, re, UserDict, shlex, shutil 21 import sys, os, getpass, getopt, re, UserDict, shlex, shutil
22 try: 22 try:
23 import csv 23 import csv
24 except ImportError: 24 except ImportError:
991 except KeyError: 991 except KeyError:
992 print _('No such Role "%(role)s"')%locals() 992 print _('No such Role "%(role)s"')%locals()
993 return 1 993 return 1
994 else: 994 else:
995 roles = self.db.security.role.items() 995 roles = self.db.security.role.items()
996 role = self.db.config.NEW_WEB_USER_ROLES
997 if ',' in role:
998 print _('New Web users get the Roles "%(role)s"')%locals()
999 else:
1000 print _('New Web users get the Role "%(role)s"')%locals()
1001 role = self.db.config.NEW_EMAIL_USER_ROLES
1002 if ',' in role:
1003 print _('New Email users get the Roles "%(role)s"')%locals()
1004 else:
1005 print _('New Email users get the Role "%(role)s"')%locals()
996 roles.sort() 1006 roles.sort()
997 for rolename, role in roles: 1007 for rolename, role in roles:
998 print _('Role "%(name)s":')%role.__dict__ 1008 print _('Role "%(name)s":')%role.__dict__
999 for permission in role.permissions: 1009 for permission in role.permissions:
1000 if permission.klass: 1010 if permission.klass:
1152 tool = AdminTool() 1162 tool = AdminTool()
1153 sys.exit(tool.main()) 1163 sys.exit(tool.main())
1154 1164
1155 # 1165 #
1156 # $Log: not supported by cvs2svn $ 1166 # $Log: not supported by cvs2svn $
1167 # Revision 1.20 2002/08/01 00:56:22 richard
1168 # Added the web access and email access permissions, so people can restrict
1169 # access to users who register through the email interface (for example).
1170 # Also added "security" command to the roundup-admin interface to display the
1171 # Role/Permission config for an instance.
1172 #
1157 # Revision 1.19 2002/07/25 07:14:05 richard 1173 # Revision 1.19 2002/07/25 07:14:05 richard
1158 # Bugger it. Here's the current shape of the new security implementation. 1174 # Bugger it. Here's the current shape of the new security implementation.
1159 # Still to do: 1175 # Still to do:
1160 # . call the security funcs from cgi and mailgw 1176 # . call the security funcs from cgi and mailgw
1161 # . change shipped templates to include correct initialisation and remove 1177 # . change shipped templates to include correct initialisation and remove

Roundup Issue Tracker: http://roundup-tracker.org/