summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2015-03-16 14:34:24 -0400
committerRob Crittenden <rcritten@redhat.com>2015-03-16 17:18:13 -0400
commit2667fc13306912d4a1481e495181679012255ef6 (patch)
tree1f9b6afe73a50ffde87539b44a91cd4caf61ecea
parent8236943374c978a8f9dc6142daac58ee0201f991 (diff)
downloadipsilon-2667fc13306912d4a1481e495181679012255ef6.tar.gz
ipsilon-2667fc13306912d4a1481e495181679012255ef6.tar.xz
ipsilon-2667fc13306912d4a1481e495181679012255ef6.zip
Save user attributes on subsequent calls to login.
When a login comes in via the remote_login() call no user attributes are set. These may be later filled in by a subsequent call to login() after the info plugins are called but a short-circuit in that function exits if the user matches the current session. Add an extra conditional such that if the user matches, userattributes are passed in and the current user attributes for this user is empty then save the new data. https://fedorahosted.org/ipsilon/ticket/86 Signed-off-by: Rob Crittenden <rcritten@redhat.com> Reviewed-by: Nathan Kinder <nkinder@redhat.com>
-rw-r--r--ipsilon/util/user.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/ipsilon/util/user.py b/ipsilon/util/user.py
index 1ce5c17..758bf3d 100644
--- a/ipsilon/util/user.py
+++ b/ipsilon/util/user.py
@@ -121,6 +121,8 @@ class UserSession(Log):
def login(self, username, userattrs=None):
if self.user == username:
+ if userattrs and not self.get_user_attrs():
+ self.save_user_attrs(userattrs)
return
# REMOTE_USER changed, replace user