Edit owner trust level.
Inplace editing with a combobox if user is allowed. in app config file.
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user