* Addressbook: Enable upload buttons of smime/pgp pubkeys if user is allowed to modify them.

This commit is contained in:
Hadi Nategh 2018-03-28 18:22:07 +02:00
parent 773a9410c5
commit c230c9ff16
2 changed files with 8 additions and 2 deletions

View File

@ -2416,7 +2416,13 @@ window.egw_LAB.wait(function() {
'addressbook.edit.upload' => false
));
}
if (!$readonlys['pubkey'])
{
$readonlys['addressbook:'.$content['id'].':.files/pgp-pubkey.asc'] =
$readonlys['addressbook:'.$content['id'].':.files/smime-pubkey.crt'] = false;
}
}
if (isset($readonlys['n_fileas'])) $readonlys['fileas_type'] = $readonlys['n_fileas'];
// disable not needed tabs
$readonlys['tabs']['cats'] = !($content['cat_tab'] = $this->config['cat_tab']);

View File

@ -178,11 +178,11 @@
</row>
<row valign="top">
<description value="SMIME key"/>
<vfs-upload id="addressbook:$cont[id]:.files/smime-pubkey.crt" accept=".crt,.pem,application/x-x509-ca-cert,application/x-x509-user-cert" mime="/application\/x-x509-(ca|user)-cert/" callback="addressbook.addressbook_ui.pubkey_uploaded"/>
<vfs-upload id="addressbook:$cont[id]:.files/smime-pubkey.crt" accept=".crt,.pem,application/x-x509-ca-cert,application/x-x509-user-cert" mime="/application\/(x-x509-(ca|user)|pkix)-cert/" callback="addressbook.addressbook_ui.pubkey_uploaded"/>
</row>
<row valign="top">
<description value="PGP key"/>
<vfs-upload id="addressbook:$cont[id]:.files/pgp-pubkey.asc" accept=".asc,application/pgp-keys" mime="application/pgp-keys" callback="addressbook.addressbook_ui.pubkey_uploaded"/>
<vfs-upload id="addressbook:$cont[id]:.files/pgp-pubkey.asc" accept=".asc,application/pgp-keys" mime="/(application\/pgp-keys|text\/plain)/" callback="addressbook.addressbook_ui.pubkey_uploaded"/>
</row>
<row valign="top">
<description for="pubkey" value="Public key"/>