adjustments in ssl-certificates for customers; fix change-password for customers

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2022-03-18 19:25:25 +01:00
parent c1f4ee4e05
commit 860306b855
4 changed files with 27 additions and 4 deletions

View File

@@ -190,7 +190,7 @@ if ($page == 'overview') {
\Froxlor\UI\Response::redirectTo($filename);
}
} else {
eval("echo \"" . \Froxlor\UI\Template::getTemplate('index/change_password') . "\";");
UI::view('user/change_password.html.twig');
}
} elseif ($page == 'change_language') {
if (isset($_POST['send']) && $_POST['send'] == 'send') {

View File

@@ -50,11 +50,14 @@ if ($action == 'delete') {
$log->logAction(FroxlorLogger::USR_ACTION, LOG_NOTICE, "viewed domains::ssl_certificates");
try {
$certificates_list_data = include_once dirname(__FILE__) . '/lib/tablelisting/admin/tablelisting.sslcertificates.php';
$certificates_list_data = include_once dirname(__FILE__) . '/lib/tablelisting/tablelisting.sslcertificates.php';
$collection = (new Collection(Certificates::class, $userinfo))
->has('domains', \Froxlor\Api\Commands\Domains::class, 'domainid', 'id')
->has('customer', \Froxlor\Api\Commands\Customers::class, 'customerid', 'customerid')
->withPagination($certificates_list_data['sslcertificates_list']['columns']);
if ($userinfo['adminisession'] == 1) {
$collection->has('domains', \Froxlor\Api\Commands\Domains::class, 'domainid', 'id');
} else {
$collection->has('domains', \Froxlor\Api\Commands\SubDomains::class, 'domainid', 'id');
}
} catch (Exception $e) {
Response::dynamic_error($e->getMessage());
}

View File

@@ -20,6 +20,26 @@
<label for="new_password_confirm" class="col-form-label">{{ lng('changepassword.new_password_confirm') }}</label>
<input class="form-control" type="password" name="new_password_confirm" id="new_password_confirm" value="" required/>
</div>
{% if userinfo.adminsession == 0 %}
<div class="mb-3">
<label for="change_main_ftp" class="col-form-label">{{ lng('changepassword.also_change_ftp') }}</label>
<div class="form-check form-switch">
<input type="hidden" name="change_main_ftp" value="false">
<input class="form-check-input" type="checkbox" name="change_main_ftp" id="change_main_ftp" value="true" checked>
</div>
</div>
<div class="mb-3">
<label for="change_stats" class="col-form-label">{{ lng('changepassword.also_change_stats') }}</label>
<div class="form-check form-switch">
<input type="hidden" name="change_stats" value="false">
<input class="form-check-input" type="checkbox" name="change_stats" id="change_stats" value="true" checked>
</div>
</div>
{% endif %}
</div>
<div class="card-body d-grid gap-2">