Only superadmin can enable/disable a domain
This commit is contained in:
parent
8565a9b8a0
commit
392f46ef73
|
@ -38,7 +38,7 @@ if (!empty($_POST['delete'])) {
|
|||
print '</div>';
|
||||
}
|
||||
|
||||
if (!empty($_POST['isactive'])) {
|
||||
if (!empty($_POST['isactive']) && $server->isSuperAdmin()) {
|
||||
$active = ($_POST['isactive'] == "TRUE") ? true : false;
|
||||
try {
|
||||
$domain->update($active);
|
||||
|
@ -53,10 +53,12 @@ if (!empty($_POST['isactive'])) {
|
|||
<div class="text-center">
|
||||
<?php
|
||||
print '<form name="update" method="post" action="admin.php?domain='.$domain->getName().'">';
|
||||
if (!$domain->isactive()) {
|
||||
print '<button type="submit" name="isactive" value="TRUE" class="btn btn-primary">Activer le domaine</button> ';
|
||||
} else {
|
||||
print '<button type="submit" name="isactive" value="FALSE" class="btn btn-primary">Désactiver le domaine</button> ';
|
||||
if ($server->isSuperAdmin()) {
|
||||
if (!$domain->isactive()) {
|
||||
print '<button type="submit" name="isactive" value="TRUE" class="btn btn-primary">Activer le domaine</button> ';
|
||||
} else {
|
||||
print '<button type="submit" name="isactive" value="FALSE" class="btn btn-primary">Désactiver le domaine</button> ';
|
||||
}
|
||||
}
|
||||
?>
|
||||
<a href="compte.php?domain=<?php print $domain->getName() ?>"><button type="button" class="btn btn-primary">Ajouter un nouveau compte</button></a>
|
||||
|
|
Loading…
Reference in a new issue