Private GIT

Skip to content
Snippets Groups Projects
Commit e6522bb0 authored by Miha Petkovsek's avatar Miha Petkovsek
Browse files

Single vault fix

parent 150b3ac2
No related branches found
No related tags found
No related merge requests found
......@@ -17,6 +17,7 @@ else {
// get custom fields
$custom_fields_v = $Tools->fetch_custom_fields('vaults');
$colspan = 4 + sizeof(@$custom_fields_v);
// create new Vault
if ($User->get_module_permissions ("vaults")==User::ACCESS_RWA) {
......@@ -25,13 +26,6 @@ else {
// print vaults
if($all_vaults!==false) {
// show single if only 1 configured !
if(sizeof($all_vaults)==1) {
$_GET['subnetId'] = $all_vaults[0]->id;
include('vault/index.php');
}
else {
// group by type
$all_vault_types = ["certificates"=>[], "passwords"=>[]];
foreach ($all_vaults as $v) {
......@@ -67,6 +61,8 @@ else {
# loop
print "<tbody>";
if(sizeof($all_vaults_grouped)>0) {
foreach ($all_vaults_grouped as $a) {
// set link
if($User->Crypto->decrypt($a->test, $_SESSION['vault'.$a->id]) == "test") {
......@@ -116,11 +112,17 @@ else {
print '</tr>' . "\n";
}
}
else {
print '<tr class="text-top">';
print ' <td colspan="'.$colspan.'">'.$Result->show("info", _("No vaults created"), false, false, true).'</td>';
print "</tr>";
}
print "</tbody>";
print "</table>";
}
}
}
else {
$Result->show("info alert-nomargin", _("No Vaults available")."!", false);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment