add normal user restrictions
This commit is contained in:
@@ -19,6 +19,17 @@ std::string msql_acces::get_passwd(std::string username){
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool msql_acces::get_admin(std::string username){
|
||||
sql::PreparedStatement *pstmt = con->prepareStatement("select admin from users where username=?");
|
||||
pstmt->setString(1,username);
|
||||
sql::ResultSet *res = pstmt->executeQuery();
|
||||
bool ret=false;
|
||||
while(res->next())
|
||||
ret = res->getBoolean("admin");
|
||||
delete res;
|
||||
return ret;
|
||||
}
|
||||
|
||||
std::list<std::string> msql_acces::get_pinfo(){
|
||||
sql::PreparedStatement *pstmt =
|
||||
con->prepareStatement("select packages.name, packages.created, packages.uses, users.username "
|
||||
|
||||
Reference in New Issue
Block a user