From: Sage Weil Date: Mon, 24 Feb 2020 15:43:26 +0000 (-0600) Subject: mgr/dashboard: behave when pwdUpdateRequired key is missing X-Git-Tag: v15.1.1~273^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F33513%2Fhead;p=ceph.git mgr/dashboard: behave when pwdUpdateRequired key is missing Fixes: https://tracker.ceph.com/issues/44271 Signed-off-by: Sage Weil --- diff --git a/src/pybind/mgr/dashboard/controllers/auth.py b/src/pybind/mgr/dashboard/controllers/auth.py index e7ceca3d6733..68c3827b4e85 100644 --- a/src/pybind/mgr/dashboard/controllers/auth.py +++ b/src/pybind/mgr/dashboard/controllers/auth.py @@ -24,8 +24,8 @@ class Auth(RESTController): user_perms, pwd_expiration_date, pwd_update_required = None, None, None if user_data: user_perms = user_data.get('permissions') - pwd_expiration_date = user_data.get('pwdExpirationDate') - pwd_update_required = user_data.get('pwdUpdateRequired') + pwd_expiration_date = user_data.get('pwdExpirationDate', None) + pwd_update_required = user_data.get('pwdUpdateRequired', False) if user_perms is not None: logger.debug('Login successful')