add normal user restrictions

This commit is contained in:
2020-05-26 18:47:14 +02:00
parent 90a76301f2
commit 49dedcd064
10 changed files with 18 additions and 49 deletions

View File

@@ -7,7 +7,17 @@ session_manager::session_manager(conexion* con)
}
bool session_manager::loggin(std::string username, std::string passwd){
return this->con->check_pass(username, passwd);
this->con->write_string(username);
this->con->write_string(passwd);
std::string result;
this->con->read_string(result,4);
return result=="pass";
}
bool session_manager::admin(){
std::string result;
this->con->read_string(result,5);
return result=="admin";
}
int session_manager::install_command(std::string package){