update naming
This commit is contained in:
@@ -46,23 +46,23 @@ class Domain
|
|||||||
return UI::getLng('domains.aliasdomain') . ' ' . $attributes['fields']['aliasdomain'];
|
return UI::getLng('domains.aliasdomain') . ' ' . $attributes['fields']['aliasdomain'];
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function canEditDomain(array $attributes): bool
|
public static function canEdit(array $attributes): bool
|
||||||
{
|
{
|
||||||
return (bool)$attributes['fields']['caneditdomain'];
|
return (bool)$attributes['fields']['caneditdomain'];
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function canViewDomainLogs(array $attributes): bool
|
public static function canViewLogs(array $attributes): bool
|
||||||
{
|
{
|
||||||
return (bool)UI::getCurrentUser()['logviewenabled'];
|
return (bool)UI::getCurrentUser()['logviewenabled'];
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function canDeleteDomain(array $attributes): bool
|
public static function canDelete(array $attributes): bool
|
||||||
{
|
{
|
||||||
return $attributes['fields']['parentdomainid'] != '0'
|
return $attributes['fields']['parentdomainid'] != '0'
|
||||||
&& empty($attributes['fields']['domainaliasid']);
|
&& empty($attributes['fields']['domainaliasid']);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function canEditDomainDNS(array $attributes): bool
|
public static function canEditDNS(array $attributes): bool
|
||||||
{
|
{
|
||||||
return $attributes['fields']['isbinddomain'] == '1'
|
return $attributes['fields']['isbinddomain'] == '1'
|
||||||
&& UI::getCurrentUser()['dnsenabled'] == '1'
|
&& UI::getCurrentUser()['dnsenabled'] == '1'
|
||||||
@@ -71,13 +71,13 @@ class Domain
|
|||||||
&& Settings::Get('system.dnsenabled') == '1';
|
&& Settings::Get('system.dnsenabled') == '1';
|
||||||
}
|
}
|
||||||
|
|
||||||
public function canEditDomainSSL(array $attributes): bool
|
public function canEditSSL(array $attributes): bool
|
||||||
{
|
{
|
||||||
// FIXME: https://github.com/Froxlor/Froxlor/blob/master/templates/Sparkle/customer/domains/domains_domain.tpl#L41
|
// FIXME: https://github.com/Froxlor/Froxlor/blob/master/templates/Sparkle/customer/domains/domains_domain.tpl#L41
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function canEditDomainAlias(array $attributes): bool
|
public function canEditAlias(array $attributes): bool
|
||||||
{
|
{
|
||||||
return !empty($attributes['fields']['domainaliasid']);
|
return !empty($attributes['fields']['domainaliasid']);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ namespace Froxlor\UI\Callbacks;
|
|||||||
* @package Froxlor\UI\Callbacks
|
* @package Froxlor\UI\Callbacks
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
class SSLCertificates
|
class SSLCertificate
|
||||||
{
|
{
|
||||||
public static function domainWithSan(array $attributes): array
|
public static function domainWithSan(array $attributes): array
|
||||||
{
|
{
|
||||||
@@ -29,4 +29,9 @@ class SSLCertificates
|
|||||||
]
|
]
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function canDelete(array $attributes): bool
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -47,7 +47,7 @@ return [
|
|||||||
'action' => 'edit',
|
'action' => 'edit',
|
||||||
'id' => ':id'
|
'id' => ':id'
|
||||||
],
|
],
|
||||||
'visible' => [Domain::class, 'canEditDomain']
|
'visible' => [Domain::class, 'canEdit']
|
||||||
],
|
],
|
||||||
'logfiles' => [
|
'logfiles' => [
|
||||||
'icon' => 'fa fa-file',
|
'icon' => 'fa fa-file',
|
||||||
@@ -56,7 +56,7 @@ return [
|
|||||||
'page' => 'logfiles',
|
'page' => 'logfiles',
|
||||||
'domain_id' => ':id'
|
'domain_id' => ':id'
|
||||||
],
|
],
|
||||||
'visible' => [Domain::class, 'canViewDomainLogs']
|
'visible' => [Domain::class, 'canViewLogs']
|
||||||
],
|
],
|
||||||
'domaindnseditor' => [
|
'domaindnseditor' => [
|
||||||
'icon' => 'fa fa-globe',
|
'icon' => 'fa fa-globe',
|
||||||
@@ -65,7 +65,7 @@ return [
|
|||||||
'page' => 'domaindnseditor',
|
'page' => 'domaindnseditor',
|
||||||
'domain_id' => ':id'
|
'domain_id' => ':id'
|
||||||
],
|
],
|
||||||
'visible' => [Domain::class, 'canEditDomainDNS']
|
'visible' => [Domain::class, 'canEditDNS']
|
||||||
],
|
],
|
||||||
'delete' => [
|
'delete' => [
|
||||||
'icon' => 'fa fa-trash',
|
'icon' => 'fa fa-trash',
|
||||||
@@ -76,7 +76,7 @@ return [
|
|||||||
'action' => 'delete',
|
'action' => 'delete',
|
||||||
'id' => ':id'
|
'id' => ':id'
|
||||||
],
|
],
|
||||||
'visible' => [Domain::class, 'canDeleteDomain']
|
'visible' => [Domain::class, 'canDelete']
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user