diff options
author | saturneric <[email protected]> | 2025-02-02 20:03:21 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2025-02-02 20:03:21 +0000 |
commit | 39387a78e2e056fa946f92ec7509ef73ad3ecfa3 (patch) | |
tree | ebb8e2376c8a898b13dc862c2b5a8d3c07b6710b /src/core | |
parent | refactor: rewrite subkey generate dialog and fix some issues discovered (diff) | |
download | GpgFrontend-39387a78e2e056fa946f92ec7509ef73ad3ecfa3.tar.gz GpgFrontend-39387a78e2e056fa946f92ec7509ef73ad3ecfa3.zip |
refactor: make some function names shorter
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/function/gpg/GpgBasicOperator.cpp | 2 | ||||
-rw-r--r-- | src/core/function/gpg/GpgKeyOpera.cpp | 16 | ||||
-rw-r--r-- | src/core/model/GpgKey.cpp | 60 | ||||
-rw-r--r-- | src/core/model/GpgKey.h | 16 | ||||
-rw-r--r-- | src/core/model/GpgKeyGenerateInfo.cpp | 41 | ||||
-rw-r--r-- | src/core/model/GpgKeyGenerateInfo.h | 24 | ||||
-rw-r--r-- | src/core/model/GpgKeyTableModel.cpp | 8 | ||||
-rw-r--r-- | src/core/model/GpgSubKey.cpp | 10 | ||||
-rw-r--r-- | src/core/model/GpgSubKey.h | 8 |
9 files changed, 86 insertions, 99 deletions
diff --git a/src/core/function/gpg/GpgBasicOperator.cpp b/src/core/function/gpg/GpgBasicOperator.cpp index fe84336d..7f36e60a 100644 --- a/src/core/function/gpg/GpgBasicOperator.cpp +++ b/src/core/function/gpg/GpgBasicOperator.cpp @@ -50,7 +50,7 @@ void SetSignersImpl(GpgContext& ctx_, const KeyArgsList& signers, bool ascii) { for (const GpgKey& key : signers) { LOG_D() << "signer's key fpr: " << key.GetFingerprint(); - if (key.IsHasActualSigningCapability()) { + if (key.IsHasActualSignCap()) { auto error = gpgme_signers_add(ctx, gpgme_key_t(key)); CheckGpgError(error); } diff --git a/src/core/function/gpg/GpgKeyOpera.cpp b/src/core/function/gpg/GpgKeyOpera.cpp index 82001337..23a848ee 100644 --- a/src/core/function/gpg/GpgKeyOpera.cpp +++ b/src/core/function/gpg/GpgKeyOpera.cpp @@ -179,15 +179,15 @@ auto GenerateKeyImpl(GpgContext& ctx, unsigned int flags = 0; if (!params->IsSubKey()) flags |= GPGME_CREATE_CERT; - if (params->IsAllowEncryption()) flags |= GPGME_CREATE_ENCR; - if (params->IsAllowSigning()) flags |= GPGME_CREATE_SIGN; - if (params->IsAllowAuthentication()) flags |= GPGME_CREATE_AUTH; + if (params->IsAllowEncr()) flags |= GPGME_CREATE_ENCR; + if (params->IsAllowSign()) flags |= GPGME_CREATE_SIGN; + if (params->IsAllowAuth()) flags |= GPGME_CREATE_AUTH; if (params->IsNonExpired()) flags |= GPGME_CREATE_NOEXPIRE; if (params->IsNoPassPhrase()) flags |= GPGME_CREATE_NOPASSWD; LOG_D() << "key generation args: " << userid << algo << expires << flags; - LOG_D() << "key generation flags" << params->IsAllowEncryption() - << params->IsAllowSigning() << params->IsAllowAuthentication() + LOG_D() << "key generation flags" << params->IsAllowEncr() + << params->IsAllowSign() << params->IsAllowAuth() << !params->IsSubKey(); err = gpgme_op_createkey(ctx.DefaultContext(), userid.toUtf8(), algo.toUtf8(), @@ -240,9 +240,9 @@ auto GenerateSubKeyImpl(GpgContext& ctx, const GpgKey& key, unsigned int flags = 0; if (!params->IsSubKey()) flags |= GPGME_CREATE_CERT; - if (params->IsAllowEncryption()) flags |= GPGME_CREATE_ENCR; - if (params->IsAllowSigning()) flags |= GPGME_CREATE_SIGN; - if (params->IsAllowAuthentication()) flags |= GPGME_CREATE_AUTH; + if (params->IsAllowEncr()) flags |= GPGME_CREATE_ENCR; + if (params->IsAllowSign()) flags |= GPGME_CREATE_SIGN; + if (params->IsAllowAuth()) flags |= GPGME_CREATE_AUTH; if (params->IsNonExpired()) flags |= GPGME_CREATE_NOEXPIRE; if (params->IsNoPassPhrase()) flags |= GPGME_CREATE_NOPASSWD; diff --git a/src/core/model/GpgKey.cpp b/src/core/model/GpgKey.cpp index 9b0ce1a5..2bf15f3a 100644 --- a/src/core/model/GpgKey.cpp +++ b/src/core/model/GpgKey.cpp @@ -28,8 +28,6 @@ #include "core/model/GpgKey.h" -#include <mutex> - namespace GpgFrontend { GpgKey::GpgKey(gpgme_key_t &&key) : key_ref_(key) {} @@ -149,21 +147,13 @@ auto GpgKey::GetPrimaryKeyLength() const -> unsigned int { return key_ref_->subkeys->length; } -auto GpgKey::IsHasEncryptionCapability() const -> bool { - return key_ref_->can_encrypt; -} +auto GpgKey::IsHasEncrCap() const -> bool { return key_ref_->can_encrypt; } -auto GpgKey::IsHasSigningCapability() const -> bool { - return key_ref_->can_sign; -} +auto GpgKey::IsHasSignCap() const -> bool { return key_ref_->can_sign; } -auto GpgKey::IsHasCertificationCapability() const -> bool { - return key_ref_->can_certify; -} +auto GpgKey::IsHasCertCap() const -> bool { return key_ref_->can_certify; } -auto GpgKey::IsHasAuthenticationCapability() const -> bool { - return key_ref_->can_authenticate; -} +auto GpgKey::IsHasAuthCap() const -> bool { return key_ref_->can_authenticate; } auto GpgKey::IsHasCardKey() const -> bool { auto subkeys = GetSubKeys(); @@ -204,24 +194,24 @@ auto GpgKey::GetUIDs() const -> std::unique_ptr<QContainer<GpgUID>> { return p_uids; } -auto GpgKey::IsHasActualSigningCapability() const -> bool { +auto GpgKey::IsHasActualSignCap() const -> bool { auto subkeys = GetSubKeys(); - return std::any_of( - subkeys->begin(), subkeys->end(), [](const GpgSubKey &subkey) -> bool { - return subkey.IsSecretKey() && subkey.IsHasSigningCapability() && - !subkey.IsDisabled() && !subkey.IsRevoked() && - !subkey.IsExpired(); - }); + return std::any_of(subkeys->begin(), subkeys->end(), + [](const GpgSubKey &subkey) -> bool { + return subkey.IsSecretKey() && subkey.IsHasSignCap() && + !subkey.IsDisabled() && !subkey.IsRevoked() && + !subkey.IsExpired(); + }); } -auto GpgKey::IsHasActualAuthenticationCapability() const -> bool { +auto GpgKey::IsHasActualAuthCap() const -> bool { auto subkeys = GetSubKeys(); - return std::any_of( - subkeys->begin(), subkeys->end(), [](const GpgSubKey &subkey) -> bool { - return subkey.IsSecretKey() && subkey.IsHasAuthenticationCapability() && - !subkey.IsDisabled() && !subkey.IsRevoked() && - !subkey.IsExpired(); - }); + return std::any_of(subkeys->begin(), subkeys->end(), + [](const GpgSubKey &subkey) -> bool { + return subkey.IsSecretKey() && subkey.IsHasAuthCap() && + !subkey.IsDisabled() && !subkey.IsRevoked() && + !subkey.IsExpired(); + }); } /** @@ -229,7 +219,7 @@ auto GpgKey::IsHasActualAuthenticationCapability() const -> bool { * @param key target key * @return if key certify */ -auto GpgKey::IsHasActualCertificationCapability() const -> bool { +auto GpgKey::IsHasActualCertCap() const -> bool { return IsHasMasterKey() && !IsExpired() && !IsRevoked() && !IsDisabled(); } @@ -238,13 +228,13 @@ auto GpgKey::IsHasActualCertificationCapability() const -> bool { * @param key target key * @return if key encrypt */ -auto GpgKey::IsHasActualEncryptionCapability() const -> bool { +auto GpgKey::IsHasActualEncrCap() const -> bool { auto subkeys = GetSubKeys(); - return std::any_of( - subkeys->begin(), subkeys->end(), [](const GpgSubKey &subkey) -> bool { - return subkey.IsHasEncryptionCapability() && !subkey.IsDisabled() && - !subkey.IsRevoked() && !subkey.IsExpired(); - }); + return std::any_of(subkeys->begin(), subkeys->end(), + [](const GpgSubKey &subkey) -> bool { + return subkey.IsHasEncrCap() && !subkey.IsDisabled() && + !subkey.IsRevoked() && !subkey.IsExpired(); + }); } void GpgKey::KeyRefDeleter::operator()(gpgme_key_t _key) { diff --git a/src/core/model/GpgKey.h b/src/core/model/GpgKey.h index adc2ffa9..1f902ca5 100644 --- a/src/core/model/GpgKey.h +++ b/src/core/model/GpgKey.h @@ -152,7 +152,7 @@ class GPGFRONTEND_CORE_EXPORT GpgKey { * @return true * @return false */ - [[nodiscard]] auto IsHasEncryptionCapability() const -> bool; + [[nodiscard]] auto IsHasEncrCap() const -> bool; /** * @brief @@ -161,7 +161,7 @@ class GPGFRONTEND_CORE_EXPORT GpgKey { * @return true * @return false */ - [[nodiscard]] auto IsHasActualEncryptionCapability() const -> bool; + [[nodiscard]] auto IsHasActualEncrCap() const -> bool; /** * @brief @@ -169,7 +169,7 @@ class GPGFRONTEND_CORE_EXPORT GpgKey { * @return true * @return false */ - [[nodiscard]] auto IsHasSigningCapability() const -> bool; + [[nodiscard]] auto IsHasSignCap() const -> bool; /** * @brief @@ -177,7 +177,7 @@ class GPGFRONTEND_CORE_EXPORT GpgKey { * @return true * @return false */ - [[nodiscard]] auto IsHasActualSigningCapability() const -> bool; + [[nodiscard]] auto IsHasActualSignCap() const -> bool; /** * @brief @@ -185,7 +185,7 @@ class GPGFRONTEND_CORE_EXPORT GpgKey { * @return true * @return false */ - [[nodiscard]] auto IsHasCertificationCapability() const -> bool; + [[nodiscard]] auto IsHasCertCap() const -> bool; /** * @brief @@ -193,7 +193,7 @@ class GPGFRONTEND_CORE_EXPORT GpgKey { * @return true * @return false */ - [[nodiscard]] auto IsHasActualCertificationCapability() const -> bool; + [[nodiscard]] auto IsHasActualCertCap() const -> bool; /** * @brief @@ -201,7 +201,7 @@ class GPGFRONTEND_CORE_EXPORT GpgKey { * @return true * @return false */ - [[nodiscard]] auto IsHasAuthenticationCapability() const -> bool; + [[nodiscard]] auto IsHasAuthCap() const -> bool; /** * @brief @@ -209,7 +209,7 @@ class GPGFRONTEND_CORE_EXPORT GpgKey { * @return true * @return false */ - [[nodiscard]] auto IsHasActualAuthenticationCapability() const -> bool; + [[nodiscard]] auto IsHasActualAuthCap() const -> bool; /** * @brief diff --git a/src/core/model/GpgKeyGenerateInfo.cpp b/src/core/model/GpgKeyGenerateInfo.cpp index 1493c3af..a8dcbd19 100644 --- a/src/core/model/GpgKeyGenerateInfo.cpp +++ b/src/core/model/GpgKeyGenerateInfo.cpp @@ -169,16 +169,16 @@ void KeyGenerateInfo::SetAlgo(const KeyAlgo &algo) { // reset all options reset_options(); - this->SetAllowCertification(algo.CanCert()); + this->SetAllowCert(algo.CanCert()); this->allow_change_certification_ = false; - SetAllowEncryption(algo.CanEncrypt()); + SetAllowEncr(algo.CanEncrypt()); allow_change_encryption_ = algo.CanEncrypt(); - SetAllowSigning(algo.CanSign()); + SetAllowSign(algo.CanSign()); allow_change_signing_ = algo.CanSign(); - SetAllowAuthentication(algo.CanAuth()); + SetAllowAuth(algo.CanAuth()); allow_change_authentication_ = algo.CanAuth(); this->algo_ = algo; @@ -186,16 +186,16 @@ void KeyGenerateInfo::SetAlgo(const KeyAlgo &algo) { void KeyGenerateInfo::reset_options() { allow_change_encryption_ = true; - SetAllowEncryption(true); + SetAllowEncr(true); allow_change_certification_ = true; - SetAllowCertification(true); + SetAllowCert(true); allow_change_signing_ = true; - SetAllowSigning(true); + SetAllowSign(true); allow_change_authentication_ = true; - SetAllowAuthentication(true); + SetAllowAuth(true); } void KeyGenerateInfo::SetExpireTime(const QDateTime &m_expired) { @@ -207,13 +207,13 @@ void KeyGenerateInfo::SetNonExpired(bool m_non_expired) { KeyGenerateInfo::non_expired_ = m_non_expired; } -void KeyGenerateInfo::SetAllowEncryption(bool m_allow_encryption) { +void KeyGenerateInfo::SetAllowEncr(bool m_allow_encryption) { if (allow_change_encryption_) { KeyGenerateInfo::allow_encryption_ = m_allow_encryption; } } -void KeyGenerateInfo::SetAllowCertification(bool m_allow_certification) { +void KeyGenerateInfo::SetAllowCert(bool m_allow_certification) { if (allow_change_certification_) { KeyGenerateInfo::allow_certification_ = m_allow_certification; } @@ -357,7 +357,7 @@ void KeyGenerateInfo::SetNonPassPhrase(bool m_non_pass_phrase) { * @return true * @return false */ -[[nodiscard]] auto KeyGenerateInfo::IsAllowSigning() const -> bool { +[[nodiscard]] auto KeyGenerateInfo::IsAllowSign() const -> bool { return allow_signing_; } @@ -376,7 +376,7 @@ void KeyGenerateInfo::SetNonPassPhrase(bool m_non_pass_phrase) { * * @param m_allow_signing */ -void KeyGenerateInfo::SetAllowSigning(bool m_allow_signing) { +void KeyGenerateInfo::SetAllowSign(bool m_allow_signing) { if (allow_change_signing_) KeyGenerateInfo::allow_signing_ = m_allow_signing; } @@ -386,7 +386,7 @@ void KeyGenerateInfo::SetAllowSigning(bool m_allow_signing) { * @return true * @return false */ -[[nodiscard]] auto KeyGenerateInfo::IsAllowEncryption() const -> bool { +[[nodiscard]] auto KeyGenerateInfo::IsAllowEncr() const -> bool { return allow_encryption_; } @@ -396,7 +396,7 @@ void KeyGenerateInfo::SetAllowSigning(bool m_allow_signing) { * @return true * @return false */ -[[nodiscard]] auto KeyGenerateInfo::IsAllowCertification() const -> bool { +[[nodiscard]] auto KeyGenerateInfo::IsAllowCert() const -> bool { return allow_certification_; } @@ -406,7 +406,7 @@ void KeyGenerateInfo::SetAllowSigning(bool m_allow_signing) { * @return true * @return false */ -[[nodiscard]] auto KeyGenerateInfo::IsAllowAuthentication() const -> bool { +[[nodiscard]] auto KeyGenerateInfo::IsAllowAuth() const -> bool { return allow_authentication_; } @@ -415,7 +415,7 @@ void KeyGenerateInfo::SetAllowSigning(bool m_allow_signing) { * * @param m_allow_authentication */ -void KeyGenerateInfo::SetAllowAuthentication(bool m_allow_authentication) { +void KeyGenerateInfo::SetAllowAuth(bool m_allow_authentication) { if (allow_change_authentication_) { KeyGenerateInfo::allow_authentication_ = m_allow_authentication; } @@ -427,7 +427,7 @@ void KeyGenerateInfo::SetAllowAuthentication(bool m_allow_authentication) { * @return true * @return false */ -[[nodiscard]] auto KeyGenerateInfo::IsAllowChangeSigning() const -> bool { +[[nodiscard]] auto KeyGenerateInfo::IsAllowModifySign() const -> bool { return allow_change_signing_; } @@ -437,7 +437,7 @@ void KeyGenerateInfo::SetAllowAuthentication(bool m_allow_authentication) { * @return true * @return false */ -[[nodiscard]] auto KeyGenerateInfo::IsAllowChangeEncryption() const -> bool { +[[nodiscard]] auto KeyGenerateInfo::IsAllowModifyEncr() const -> bool { return allow_change_encryption_; } @@ -447,7 +447,7 @@ void KeyGenerateInfo::SetAllowAuthentication(bool m_allow_authentication) { * @return true * @return false */ -[[nodiscard]] auto KeyGenerateInfo::IsAllowChangeCertification() const -> bool { +[[nodiscard]] auto KeyGenerateInfo::IsAllowModifyCert() const -> bool { return allow_change_certification_; } @@ -457,8 +457,7 @@ void KeyGenerateInfo::SetAllowAuthentication(bool m_allow_authentication) { * @return true * @return false */ -[[nodiscard]] auto KeyGenerateInfo::IsAllowChangeAuthentication() const - -> bool { +[[nodiscard]] auto KeyGenerateInfo::IsAllowModifyAuth() const -> bool { return allow_change_authentication_; } diff --git a/src/core/model/GpgKeyGenerateInfo.h b/src/core/model/GpgKeyGenerateInfo.h index 54ec5a29..98902418 100644 --- a/src/core/model/GpgKeyGenerateInfo.h +++ b/src/core/model/GpgKeyGenerateInfo.h @@ -257,7 +257,7 @@ class GPGFRONTEND_CORE_EXPORT KeyGenerateInfo { * @return true * @return false */ - [[nodiscard]] auto IsAllowSigning() const -> bool; + [[nodiscard]] auto IsAllowSign() const -> bool; /** * @brief @@ -272,7 +272,7 @@ class GPGFRONTEND_CORE_EXPORT KeyGenerateInfo { * * @param m_allow_signing */ - void SetAllowSigning(bool m_allow_signing); + void SetAllowSign(bool m_allow_signing); /** * @brief @@ -280,14 +280,14 @@ class GPGFRONTEND_CORE_EXPORT KeyGenerateInfo { * @return true * @return false */ - [[nodiscard]] auto IsAllowEncryption() const -> bool; + [[nodiscard]] auto IsAllowEncr() const -> bool; /** * @brief Set the Allow Encryption object * * @param m_allow_encryption */ - void SetAllowEncryption(bool m_allow_encryption); + void SetAllowEncr(bool m_allow_encryption); /** * @brief @@ -295,14 +295,14 @@ class GPGFRONTEND_CORE_EXPORT KeyGenerateInfo { * @return true * @return false */ - [[nodiscard]] auto IsAllowCertification() const -> bool; + [[nodiscard]] auto IsAllowCert() const -> bool; /** * @brief Set the Allow Certification object * * @param m_allow_certification */ - void SetAllowCertification(bool m_allow_certification); + void SetAllowCert(bool m_allow_certification); /** * @brief @@ -310,14 +310,14 @@ class GPGFRONTEND_CORE_EXPORT KeyGenerateInfo { * @return true * @return false */ - [[nodiscard]] auto IsAllowAuthentication() const -> bool; + [[nodiscard]] auto IsAllowAuth() const -> bool; /** * @brief Set the Allow Authentication object * * @param m_allow_authentication */ - void SetAllowAuthentication(bool m_allow_authentication); + void SetAllowAuth(bool m_allow_authentication); /** * @brief @@ -325,7 +325,7 @@ class GPGFRONTEND_CORE_EXPORT KeyGenerateInfo { * @return true * @return false */ - [[nodiscard]] auto IsAllowChangeSigning() const -> bool; + [[nodiscard]] auto IsAllowModifySign() const -> bool; /** * @brief @@ -333,7 +333,7 @@ class GPGFRONTEND_CORE_EXPORT KeyGenerateInfo { * @return true * @return false */ - [[nodiscard]] auto IsAllowChangeEncryption() const -> bool; + [[nodiscard]] auto IsAllowModifyEncr() const -> bool; /** * @brief @@ -341,7 +341,7 @@ class GPGFRONTEND_CORE_EXPORT KeyGenerateInfo { * @return true * @return false */ - [[nodiscard]] auto IsAllowChangeCertification() const -> bool; + [[nodiscard]] auto IsAllowModifyCert() const -> bool; /** * @brief @@ -349,7 +349,7 @@ class GPGFRONTEND_CORE_EXPORT KeyGenerateInfo { * @return true * @return false */ - [[nodiscard]] auto IsAllowChangeAuthentication() const -> bool; + [[nodiscard]] auto IsAllowModifyAuth() const -> bool; private: bool subkey_ = false; ///< diff --git a/src/core/model/GpgKeyTableModel.cpp b/src/core/model/GpgKeyTableModel.cpp index 17a59a3a..b9d03bb6 100644 --- a/src/core/model/GpgKeyTableModel.cpp +++ b/src/core/model/GpgKeyTableModel.cpp @@ -88,10 +88,10 @@ auto GpgKeyTableModel::data(const QModelIndex &index, } case 4: { QString usage_sym; - if (key.IsHasActualCertificationCapability()) usage_sym += "C"; - if (key.IsHasActualEncryptionCapability()) usage_sym += "E"; - if (key.IsHasActualSigningCapability()) usage_sym += "S"; - if (key.IsHasActualAuthenticationCapability()) usage_sym += "A"; + if (key.IsHasActualCertCap()) usage_sym += "C"; + if (key.IsHasActualEncrCap()) usage_sym += "E"; + if (key.IsHasActualSignCap()) usage_sym += "S"; + if (key.IsHasActualAuthCap()) usage_sym += "A"; return usage_sym; } case 5: { diff --git a/src/core/model/GpgSubKey.cpp b/src/core/model/GpgSubKey.cpp index eba4167e..98b87706 100644 --- a/src/core/model/GpgSubKey.cpp +++ b/src/core/model/GpgSubKey.cpp @@ -60,19 +60,17 @@ auto GpgSubKey::GetKeyLength() const -> unsigned int { return subkey_ref_->length; } -auto GpgSubKey::IsHasEncryptionCapability() const -> bool { +auto GpgSubKey::IsHasEncrCap() const -> bool { return subkey_ref_->can_encrypt; } -auto GpgSubKey::IsHasSigningCapability() const -> bool { - return subkey_ref_->can_sign; -} +auto GpgSubKey::IsHasSignCap() const -> bool { return subkey_ref_->can_sign; } -auto GpgSubKey::IsHasCertificationCapability() const -> bool { +auto GpgSubKey::IsHasCertCap() const -> bool { return subkey_ref_->can_certify; } -auto GpgSubKey::IsHasAuthenticationCapability() const -> bool { +auto GpgSubKey::IsHasAuthCap() const -> bool { return subkey_ref_->can_authenticate; } diff --git a/src/core/model/GpgSubKey.h b/src/core/model/GpgSubKey.h index 58c6298a..f7d6afd9 100644 --- a/src/core/model/GpgSubKey.h +++ b/src/core/model/GpgSubKey.h @@ -81,7 +81,7 @@ class GPGFRONTEND_CORE_EXPORT GpgSubKey { * @return true * @return false */ - [[nodiscard]] auto IsHasEncryptionCapability() const -> bool; + [[nodiscard]] auto IsHasEncrCap() const -> bool; /** * @brief @@ -89,7 +89,7 @@ class GPGFRONTEND_CORE_EXPORT GpgSubKey { * @return true * @return false */ - [[nodiscard]] auto IsHasSigningCapability() const -> bool; + [[nodiscard]] auto IsHasSignCap() const -> bool; /** * @brief @@ -97,7 +97,7 @@ class GPGFRONTEND_CORE_EXPORT GpgSubKey { * @return true * @return false */ - [[nodiscard]] auto IsHasCertificationCapability() const -> bool; + [[nodiscard]] auto IsHasCertCap() const -> bool; /** * @brief @@ -105,7 +105,7 @@ class GPGFRONTEND_CORE_EXPORT GpgSubKey { * @return true * @return false */ - [[nodiscard]] auto IsHasAuthenticationCapability() const -> bool; + [[nodiscard]] auto IsHasAuthCap() const -> bool; /** * @brief |