Skip to content
This repository was archived by the owner on Apr 20, 2020. It is now read-only.

Commit 29ee768

Browse files
author
MrCrankHank
committed
Remove Add/delete discovery user
1 parent 3b5eab9 commit 29ee768

File tree

6 files changed

+0
-274
lines changed

6 files changed

+0
-274
lines changed

app/controllers/Targets.php

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -16,52 +16,6 @@ public function addtarget() {
1616
}
1717
}
1818

19-
public function adddisuser() {
20-
if (isset($_POST['id'], $_POST['type'])) {
21-
$type = filter_input(INPUT_POST, 'type', FILTER_SANITIZE_STRING);
22-
$id = filter_input(INPUT_POST, 'id', FILTER_SANITIZE_NUMBER_INT);
23-
24-
if ($type === 'Incoming') {
25-
$type = 'IncomingUser';
26-
} else if ($type === 'Outgoing') {
27-
$type = 'OutgoingUser';
28-
} else {
29-
echo "The type value is invalid!";
30-
die();
31-
}
32-
$target = $this->model('target\Target');
33-
$target->add_user($id, true, $type);
34-
echo json_encode($target->logging->get_action_result());
35-
} else {
36-
$data = $this->baseModel->database->get_all_usernames(true);
37-
38-
if ($data != 0) {
39-
$this->view('targets/add_dis_user', $data);
40-
} else {
41-
$this->view('message', array('message' => 'Error - No user available!', 'type' => 'warning', 'container' => true));
42-
}
43-
}
44-
}
45-
46-
public function deletedisuser() {
47-
if (isset($_POST['type'], $_POST['id'])) {
48-
$type = filter_input(INPUT_POST, 'type', FILTER_SANITIZE_STRING);
49-
$id = filter_input(INPUT_POST, 'id', FILTER_SANITIZE_NUMBER_INT);
50-
51-
$target = $this->model('target\Target');
52-
$target->delete_user($id, true, $type);
53-
echo json_encode($target->logging->get_action_result());
54-
} else {
55-
$target = $this->model('target\Target');
56-
$data = $target->get_user(true);
57-
if ($data !== false) {
58-
$this->view('targets/delete_dis_user', $data);
59-
} else {
60-
$this->view('message', array('message' => 'Error - No user available!', 'type' => 'warning', 'container' => true));
61-
}
62-
}
63-
}
64-
6519
public function configure($iqn = false, $function = false) {
6620
if ($iqn !== false) {
6721
$iqn = filter_var($iqn, FILTER_SANITIZE_STRING);

app/views/menu.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@
2929
<ul class = "dropdown-menu">
3030
<li><a class="workspaceTab" href="<?php echo WEB_PATH ?>/targets/addtarget"><span class="glyphicon glyphicon-plus"></span> Add</a></li>
3131
<li><a class="workspaceTab" href="<?php echo WEB_PATH ?>/targets/configure"><span class="glyphicon glyphicon-wrench"></span> Configure</a></li>
32-
<li class="divider"></li>
33-
<li><a class="workspaceTab" href="<?php echo WEB_PATH ?>/targets/adddisuser"><span class="glyphicon glyphicon-plus"></span> Add discovery user</a></li>
34-
<li><a class="workspaceTab" href="<?php echo WEB_PATH ?>/targets/deletedisuser"><span class="glyphicon glyphicon-trash"></span> Delete discovery user</a></li>
3532
</ul>
3633
</li>
3734
<li><a class="workspaceTab" href="<?php echo WEB_PATH ?>/ietusers"><span class="glyphicon glyphicon-user"></span> <span>iSCSI users</span></a></li>

app/views/targets/add_dis_user.php

Lines changed: 0 additions & 52 deletions
This file was deleted.

app/views/targets/delete_dis_user.php

Lines changed: 0 additions & 44 deletions
This file was deleted.

public/js/pages/target/add_dis_user.js

Lines changed: 0 additions & 64 deletions
This file was deleted.

public/js/pages/target/delete_dis_user.js

Lines changed: 0 additions & 65 deletions
This file was deleted.

0 commit comments

Comments
 (0)