Changeset 588
- Timestamp:
- 02/16/12 13:23:52 (12 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ChangeLog
r585 r588 16 16 Author: Thomas Moschny 17 17 Applied by: Bas van der Vlies 18 19 * Added new parameters: 20 - white_list_registered_users 21 - white_list_file 22 23 white_list_registered_users: 24 This will allow registered user to create or update an ticket even 25 when they are not added to the 'white_list' in the configuration 26 file. 27 28 white_list_file: 29 This will read allowed users from a file. One email address per line 30 31 Suggested by: randy add psg dot com, closes ticket #288 32 Author: Bas van der Vlies 18 33 19 34 2.4.7 -
trunk/email2trac.py.in
r587 r588 439 439 440 440 441 def acl_list_from_file(self, f, keyword): 442 """ 443 Read the email address from a file 444 """ 445 self.logger.debug('function acl_list_from_file %s : %s' %(f, keyword)) 446 447 if not os.path.isfile(f): 448 self.logger.error('%s_file: %s does not exists' %(keyword, f) ) 449 else: 450 ## read whole file and replace '\n' with '' 451 # 452 addr_l = open(f, 'r').readlines() 453 s = ','.join(addr_l).replace('\n','') 454 455 try: 456 self.parameters[keyword] = "%s,%s" %(self.parameters[keyword], s) 457 except KeyError, detail: 458 self.parameters[keyword] = s 459 441 460 ########## DEBUG functions ########################################################### 442 461 … … 1691 1710 self.get_sender_info(m) 1692 1711 1693 # 1712 1713 if self.parameters.white_list_file: 1714 self.acl_list_from_file(self.parameters.white_list_file, 'white_list') 1694 1715 1695 1716 if not ( self.email_header_acl('white_list', self.email_addr, True) or self.allow_registered_user ) :
Note: See TracChangeset
for help on using the changeset viewer.