add normal user restrictions
This commit is contained in:
@@ -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){
|
||||
|
||||
Reference in New Issue
Block a user