Коммит 469dc130 создал по автору sgakerru's avatar sgakerru
Просмотр файлов

AuthService: добавлено использование опций `wifi-eap-domain` и `wifi-eap-ssid`

владелец 487c858f
......@@ -209,7 +209,7 @@ void AuthService::handleEapWifi(const QString &ssid, const QString &login, const
"wifi-sec.key-mgmt wpa-eap 802-1x.password-flags 2 "
"802-1x.eap peap 802-1x.phase2-auth mschapv2 "
"802-1x.identity \"%2\" 802-1x.domain-suffix-match %3 ssid %4")
.arg(this->enterpriseConnectionName).arg(login).arg("hq.corp.mos.ru").arg(ssid);
.arg(this->enterpriseConnectionName).arg(login).arg(config->wifiEapDomain()).arg(ssid);
const QString connectTo = QString("echo %1 | nmcli connection up %2 --ask").arg(pass).arg(this->enterpriseConnectionName);
const QString cmd = deleteIfExist + " ; " + checkExist + " || (" + create + " && " + enableWifi + " && " + connectTo + ")";
......@@ -230,3 +230,13 @@ bool AuthService::loginLowercaseOnly() const
{
return config->loginLowercaseOnly();
}
bool AuthService::wifiEapDomainIsSet() const
{
return config->wifiEapDomain().length() > 0;
}
QString AuthService::wifiEapSsid() const
{
return config->wifiEapSsid();
}
\ Нет новой строки в конце файла
......@@ -15,6 +15,8 @@ class AuthService : public QObject
Q_PROPERTY(bool guestEnabled READ guestEnabled CONSTANT)
Q_PROPERTY(bool mosAuthBtnEnabled READ mosAuthBtnEnabled CONSTANT)
Q_PROPERTY(bool loginLowercaseOnly READ loginLowercaseOnly CONSTANT)
Q_PROPERTY(bool wifiEapDomainIsSet READ wifiEapDomainIsSet CONSTANT)
Q_PROPERTY(QString wifiEapSsid READ wifiEapSsid CONSTANT)
public:
enum Role {
......@@ -30,6 +32,9 @@ public:
bool guestEnabled() const;
bool mosAuthBtnEnabled() const;
bool loginLowercaseOnly() const;
bool wifiEapDomainIsSet() const;
QString wifiEapSsid() const;
Q_INVOKABLE void registerUser(const QString &obrId, //
const QString &name,
......
Поддерживает Markdown
0% или .
You are about to add 0 people to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Пожалуйста, зарегистрируйтесь или чтобы прокомментировать