#include "parser_admins.h"
#include "stg/admins.h"
+#include "stg/admin.h"
+#include "stg/admin_conf.h"
#include <strings.h> // strcasecmp
void GET_ADMINS::CreateAnswer()
{
- const PRIV * priv = m_currAdmin.GetPriv();
+ const auto priv = m_currAdmin.GetPriv();
if (!priv->adminChg)
{
m_answer = "<Error Result=\"Error. Access denied.\"/>";
}
m_answer = "<Admins>";
- ADMIN_CONF ac;
+ AdminConf ac;
int h = m_admins.OpenSearch();
while (m_admins.SearchNext(h, &ac) == 0)
{
if (!login.empty())
{
- ADMIN * origAdmin = NULL;
+ Admin * origAdmin = NULL;
if (m_admins.Find(login, &origAdmin))
{
return;
}
- ADMIN_CONF conf(origAdmin->GetConf());
+ AdminConf conf(origAdmin->GetConf());
if (!password.empty())
conf.password = password.data();
return;
}
- conf.priv.FromInt(p);
+ conf.priv = Priv(p);
}
if (m_admins.Change(conf, &m_currAdmin) != 0)