Auth subsystem update
This commit is contained in:
parent
3e9f424c92
commit
2293c377eb
2 changed files with 4 additions and 4 deletions
|
|
@ -1,8 +1,8 @@
|
||||||
#include "auth_system.h"
|
#include "auth_system.h"
|
||||||
|
|
||||||
|
|
||||||
const user_entity& auth_system::get_user(const QString &login, bool &success) {
|
const user_entity* auth_system::get_user(const QString &login, bool &success) {
|
||||||
user_entity *out;
|
user_entity *out = nullptr;
|
||||||
|
|
||||||
success = false;
|
success = false;
|
||||||
for (user_entity &item : this->_users) {
|
for (user_entity &item : this->_users) {
|
||||||
|
|
@ -13,7 +13,7 @@ const user_entity& auth_system::get_user(const QString &login, bool &success) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return *out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool auth_system::remove_user(const QString &login) {
|
bool auth_system::remove_user(const QString &login) {
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ private:
|
||||||
public:
|
public:
|
||||||
auth_system() = default;
|
auth_system() = default;
|
||||||
|
|
||||||
const user_entity& get_user(const QString &login, bool &success);
|
const user_entity* get_user(const QString &login, bool &success);
|
||||||
bool remove_user(const QString &login);
|
bool remove_user(const QString &login);
|
||||||
bool register_user(const QString &login, const QString &password, UserRole role);
|
bool register_user(const QString &login, const QString &password, UserRole role);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue