comparison roundup/mailgw.py @ 948:8d8db618c2c3

grant email access to admin too ;)
author Richard Jones <richard@users.sourceforge.net>
date Mon, 19 Aug 2002 00:21:56 +0000
parents 23c9d4f86380
children 04a6b3bfbf23
comparison
equal deleted inserted replaced
947:14f37b1774ed 948:8d8db618c2c3
71 set() method to add the message to the item's spool; in the second case we 71 set() method to add the message to the item's spool; in the second case we
72 are calling the create() method to create a new node). If an auditor raises 72 are calling the create() method to create a new node). If an auditor raises
73 an exception, the original message is bounced back to the sender with the 73 an exception, the original message is bounced back to the sender with the
74 explanatory message given in the exception. 74 explanatory message given in the exception.
75 75
76 $Id: mailgw.py,v 1.80 2002-08-01 00:56:22 richard Exp $ 76 $Id: mailgw.py,v 1.81 2002-08-19 00:21:56 richard Exp $
77 ''' 77 '''
78 78
79 79
80 import string, re, os, mimetools, cStringIO, smtplib, socket, binascii, quopri 80 import string, re, os, mimetools, cStringIO, smtplib, socket, binascii, quopri
81 import time, random 81 import time, random
100 ''' Create some Permissions and Roles on the security object 100 ''' Create some Permissions and Roles on the security object
101 101
102 This function is directly invoked by security.Security.__init__() 102 This function is directly invoked by security.Security.__init__()
103 as a part of the Security object instantiation. 103 as a part of the Security object instantiation.
104 ''' 104 '''
105 newid = security.addPermission(name="Email Registration", 105 security.addPermission(name="Email Registration",
106 description="Anonymous may register through e-mail") 106 description="Anonymous may register through e-mail")
107 security.addPermission(name="Email Access", 107 p = security.addPermission(name="Email Access",
108 description="User may use the email interface") 108 description="User may use the email interface")
109 security.addPermissionToRole('Admin', p)
109 110
110 class Message(mimetools.Message): 111 class Message(mimetools.Message):
111 ''' subclass mimetools.Message so we can retrieve the parts of the 112 ''' subclass mimetools.Message so we can retrieve the parts of the
112 message... 113 message...
113 ''' 114 '''
851 content = '\n\n'.join(l) 852 content = '\n\n'.join(l)
852 return summary, content 853 return summary, content
853 854
854 # 855 #
855 # $Log: not supported by cvs2svn $ 856 # $Log: not supported by cvs2svn $
857 # Revision 1.80 2002/08/01 00:56:22 richard
858 # Added the web access and email access permissions, so people can restrict
859 # access to users who register through the email interface (for example).
860 # Also added "security" command to the roundup-admin interface to display the
861 # Role/Permission config for an instance.
862 #
856 # Revision 1.79 2002/07/26 08:26:59 richard 863 # Revision 1.79 2002/07/26 08:26:59 richard
857 # Very close now. The cgi and mailgw now use the new security API. The two 864 # Very close now. The cgi and mailgw now use the new security API. The two
858 # templates have been migrated to that setup. Lots of unit tests. Still some 865 # templates have been migrated to that setup. Lots of unit tests. Still some
859 # issue in the web form for editing Roles assigned to users. 866 # issue in the web form for editing Roles assigned to users.
860 # 867 #

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