re-add edit button in ssl-certificates overview when manually set

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2022-12-22 11:14:11 +01:00
parent 38fb3bc25a
commit ef8dabeb89
2 changed files with 16 additions and 1 deletions

View File

@@ -38,8 +38,13 @@ class SSLCertificate
];
}
public function canDelete(array $attributes): bool
public static function canEditSSL(array $attributes): bool
{
if ((int)$attributes['fields']['domainid'] > 0
&& (int)$attributes['fields']['letsencrypt'] == 0
) {
return true;
}
return false;
}
}

View File

@@ -69,6 +69,16 @@ return [
'c.validtodate',
]),
'actions' => [
'edit' => [
'icon' => 'fa-solid fa-edit',
'title' => lng('panel.edit'),
'href' => [
'section' => 'domains',
'page' => 'domaindnseditor',
'domain_id' => ':domainid'
],
'visible' => [SSLCertificate::class, 'canEditSSL']
],
'delete' => [
'icon' => 'fa-solid fa-trash',
'title' => lng('panel.delete'),