Fix user account status for manually blocked users
User account status in web interface is displayed incorrectly
if account is disabled (or enabled) via ssh.
Test manually:
1. Create new user using web interface
2. Change user account expiration date via ssh
chage -E 1970-01-01 <new user>
User account is blocked
3. Check user status in web interface.
Blocked user account status should be displayed as "Disabled".
Change-Id: I15e93a87653289b5ba76313895da0cf7e5dd2c7c
Signed-off-by: Denis Zlobin <zlobin.d.al@gmail.com>
diff --git a/user_mgr.hpp b/user_mgr.hpp
index d7b731c..6addc49 100644
--- a/user_mgr.hpp
+++ b/user_mgr.hpp
@@ -171,6 +171,14 @@
*/
void userEnable(const std::string& userName, bool enabled);
+ /** @brief get user enabled state
+ * method to get user enabled state.
+ *
+ * @param[in] userName - name of the user
+ * @return - user enabled status (true/false)
+ */
+ virtual bool isUserEnabled(const std::string& userName);
+
/** @brief update minimum password length requirement
*
* @param[in] val - minimum password length
@@ -444,14 +452,6 @@
*/
UserSSHLists getUserAndSshGrpList(void);
- /** @brief get user enabled state
- * method to get user enabled state.
- *
- * @param[in] userName - name of the user
- * @return - user enabled status (true/false)
- */
- bool isUserEnabled(const std::string& userName);
-
/** @brief initialize the user manager objects
* method to initialize the user manager objects accordingly
*