Edit owner trust level.

Inplace editing with a combobox if user is allowed. in app config file.
This commit is contained in:
SET
2020-10-25 17:28:47 +01:00
parent ca2105733b
commit e434315940
16 changed files with 304 additions and 28 deletions

View File

@@ -29,6 +29,7 @@ using namespace std;
"UserCommonName1" : {
"canImport" : true,
"canDelete" : true,
"canEditOwnerTrust" : true,
"privKeyIds" : [
"fullKeyId1",
"fullKeyId2"
@@ -115,6 +116,17 @@ bool AppConfig::CanDelete() const
return cnObject.get("canDelete");
}
bool AppConfig::CanEditOwnerTrust() const
{
const WString commonName = GetSubjectDnAttribute(WSslCertificate::DnAttributeName::CommonName);
if (!m_SubjectCNObject.contains(commonName.toUTF8()))
return false;
Json::Object cnObject = m_SubjectCNObject.get(commonName.toUTF8());
if (!cnObject.contains("canEditOwnerTrust"))
return false;
return cnObject.get("canEditOwnerTrust");
}
vector<WString> AppConfig::PrivateKeyIds() const
{
// List private key identifiers.