New method for User
This commit is contained in:
@@ -21,6 +21,7 @@ class User:public QObject {
|
||||
Q_OBJECT
|
||||
public:
|
||||
static bool QueryUser(QString userID, QString Pwd);
|
||||
static bool existsUser(QString userCode);
|
||||
static QString getEncryptedPassword(const QString& password)
|
||||
{
|
||||
QByteArray bytePwd = password.toLatin1();
|
||||
@@ -30,6 +31,8 @@ public:
|
||||
static User* Current(){
|
||||
return currentUser;
|
||||
}
|
||||
static bool getUser(QString userUID,User& user);
|
||||
static bool insertUser(QString UserCode,User& user);
|
||||
explicit User(QObject *parent=nullptr);
|
||||
~User();
|
||||
QString getIndexName(){
|
||||
@@ -60,9 +63,11 @@ public:
|
||||
}
|
||||
bool submitChange();
|
||||
bool isAdmin();
|
||||
static QString getRoleName(QString RoleID);
|
||||
static QString getRoleID(QString RoleName);
|
||||
static QStringList getAllRoleName();
|
||||
private:
|
||||
static User* currentUser;
|
||||
|
||||
// add properties store and modify flag
|
||||
#define USER_READONLY_PROPERTY(name) QString m_##name;
|
||||
#define USER_PROPERTY(name)\
|
||||
|
||||
Reference in New Issue
Block a user