enhanced listing actions
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -62,6 +62,13 @@ class Domain
|
||||
&& empty($attributes['fields']['domainaliasid']);
|
||||
}
|
||||
|
||||
public static function adminCanDelete(array $attributes): bool
|
||||
{
|
||||
return $attributes['fields']['id'] != Settings::Get('system.hostname_id')
|
||||
&& empty($attributes['fields']['domainaliasid'])
|
||||
&& $attributes['fields']['standardsubdomain'] != $attributes['fields']['id'];
|
||||
}
|
||||
|
||||
public static function canEditDNS(array $attributes): bool
|
||||
{
|
||||
return $attributes['fields']['isbinddomain'] == '1'
|
||||
@@ -71,6 +78,13 @@ class Domain
|
||||
&& Settings::Get('system.dnsenabled') == '1';
|
||||
}
|
||||
|
||||
public static function adminCanEditDNS(array $attributes): bool
|
||||
{
|
||||
return $attributes['fields']['isbinddomain'] == '1'
|
||||
&& Settings::Get('system.bind_enable') == '1'
|
||||
&& Settings::Get('system.dnsenabled') == '1';
|
||||
}
|
||||
|
||||
public function canEditSSL(array $attributes): bool
|
||||
{
|
||||
// FIXME: https://github.com/Froxlor/Froxlor/blob/master/templates/Sparkle/customer/domains/domains_domain.tpl#L41
|
||||
|
||||
Reference in New Issue
Block a user