Merge branch 'holomorph-remoteuser' into next
This commit is contained in:
commit
6d72fd74af
@ -154,6 +154,7 @@ class IMAPRepository(BaseRepository):
|
|||||||
if user != None:
|
if user != None:
|
||||||
return localeval.eval(user)
|
return localeval.eval(user)
|
||||||
|
|
||||||
|
if self.config.has_option(self.getsection(), 'remoteuser'):
|
||||||
user = self.getconf('remoteuser')
|
user = self.getconf('remoteuser')
|
||||||
if user != None:
|
if user != None:
|
||||||
return user
|
return user
|
||||||
@ -309,7 +310,7 @@ class IMAPRepository(BaseRepository):
|
|||||||
raise
|
raise
|
||||||
else:
|
else:
|
||||||
if netrcentry:
|
if netrcentry:
|
||||||
user = self.getconf('remoteuser')
|
user = self.getuser()
|
||||||
if user == None or user == netrcentry[0]:
|
if user == None or user == netrcentry[0]:
|
||||||
return netrcentry[2]
|
return netrcentry[2]
|
||||||
# 5. read password from /etc/netrc
|
# 5. read password from /etc/netrc
|
||||||
@ -320,7 +321,7 @@ class IMAPRepository(BaseRepository):
|
|||||||
raise
|
raise
|
||||||
else:
|
else:
|
||||||
if netrcentry:
|
if netrcentry:
|
||||||
user = self.getconf('remoteuser')
|
user = self.getuser()
|
||||||
if user == None or user == netrcentry[0]:
|
if user == None or user == netrcentry[0]:
|
||||||
return netrcentry[2]
|
return netrcentry[2]
|
||||||
# no strategy yielded a password!
|
# no strategy yielded a password!
|
||||||
|
Loading…
Reference in New Issue
Block a user