1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-08-31 22:54:11 +00:00

Modify repo share.

* Email unregistered user when sharing repo.
* Add email to contacts when share repo/file and add group user.
* Remove org repo share link.
This commit is contained in:
xiez
2012-07-31 14:58:47 +08:00
parent 1779ecfa3d
commit 7a850c7953
15 changed files with 127 additions and 112 deletions

View File

@@ -287,8 +287,15 @@ def get_ccnet_server_addr_port():
def emails2list(emails):
"""
Split email string contacted with diffent separator.
Split email strings contacted with diffent separator.
"""
email_str = emails.replace(';', ',').replace('\n', ',').replace('\r', ',')
return email_str.split(',')
# Remove empty strings and duplicate emails
s = set()
for e in email_str.split(','):
e = e.strip(' ')
if not e:
continue
s.add(e)
return [ x for x in s ]