ad suport env variable
This commit is contained in:
@@ -6,6 +6,8 @@ session_manager::session_manager(conexion* con)
|
||||
this->con=con;
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool session_manager::loggin(std::string username, std::string passwd){
|
||||
this->con->write_string(username);
|
||||
this->con->write_string(passwd);
|
||||
@@ -17,6 +19,12 @@ bool session_manager::loggin(std::string username, std::string passwd){
|
||||
bool session_manager::admin(){
|
||||
std::string result;
|
||||
this->con->read_string(result,5);
|
||||
std::string env;
|
||||
if(this->con->get_conf()->get_param("env", env)){
|
||||
this->con->write_string(env);
|
||||
}else{
|
||||
this->con->write_string("no");
|
||||
}
|
||||
return result=="admin";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user