2011-06-06 Dario Rodriguez <dario.rodriguez@artica.es>
* godmode/servers/manage_recontask.php: User with flag AW can manage recon task, only for their group. * godmode/servers/modificar_server.php: User with AW flag can view server status but only Pandora Admin can delete one of them. * godmode/servers/manage_recontask_form.php: User with flag AW can manage recon task, but only for their group. * godmode/menu.php: Allowing user with flag AW see manage server tab and manage recon task subtab. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4408 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
0f13923eff
commit
e99f60754f
|
@ -1,3 +1,14 @@
|
||||||
|
2011-06-06 Dario Rodriguez <dario.rodriguez@artica.es>
|
||||||
|
|
||||||
|
* godmode/servers/manage_recontask.php: User with flag AW can manage recon
|
||||||
|
task, only for their group.
|
||||||
|
* godmode/servers/modificar_server.php: User with AW flag can view server
|
||||||
|
status but only Pandora Admin can delete one of them.
|
||||||
|
* godmode/servers/manage_recontask_form.php: User with flag AW can manage recon
|
||||||
|
task, but only for their group.
|
||||||
|
* godmode/menu.php: Allowing user with flag AW see manage server tab and
|
||||||
|
manage recon task subtab.
|
||||||
|
|
||||||
2011-06-06 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
2011-06-06 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
||||||
|
|
||||||
* include/functions_tags.php: Fixed problem on
|
* include/functions_tags.php: Fixed problem on
|
||||||
|
|
|
@ -149,7 +149,7 @@ if (check_acl ($config['id_user'], 0, "IW")) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (check_acl ($config['id_user'], 0, "PM")) {
|
if (check_acl ($config['id_user'], 0, "AW")) {
|
||||||
|
|
||||||
// Servers
|
// Servers
|
||||||
$menu["gservers"]["text"] = __('Manage servers');
|
$menu["gservers"]["text"] = __('Manage servers');
|
||||||
|
@ -158,9 +158,15 @@ if (check_acl ($config['id_user'], 0, "PM")) {
|
||||||
|
|
||||||
$sub = array ();
|
$sub = array ();
|
||||||
$sub["godmode/servers/manage_recontask"]["text"] = __('Manage recontask');
|
$sub["godmode/servers/manage_recontask"]["text"] = __('Manage recontask');
|
||||||
$sub["godmode/servers/plugin"]["text"] = __('Manage plugins');
|
|
||||||
$sub["godmode/servers/recon_script"]["text"] = __('Manage recon script');
|
//This subtabs are only for Pandora Admin
|
||||||
enterprise_hook('export_target_submenu');
|
if (give_acl ($config['id_user'], 0, "PM")) {
|
||||||
|
$sub["godmode/servers/plugin"]["text"] = __('Manage plugins');
|
||||||
|
|
||||||
|
$sub["godmode/servers/recon_script"]["text"] = __('Manage recon script');
|
||||||
|
|
||||||
|
enterprise_hook('export_target_submenu');
|
||||||
|
}
|
||||||
|
|
||||||
$menu["gservers"]["sub"] = $sub;
|
$menu["gservers"]["sub"] = $sub;
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,7 @@ global $config;
|
||||||
|
|
||||||
check_login ();
|
check_login ();
|
||||||
|
|
||||||
if (! check_acl ($config['id_user'], 0, "PM")) {
|
if (! check_acl ($config['id_user'], 0, "AW")) {
|
||||||
db_pandora_audit("ACL Violation",
|
db_pandora_audit("ACL Violation",
|
||||||
"Trying to access Recon Task Management");
|
"Trying to access Recon Task Management");
|
||||||
require ("general/noaccess.php");
|
require ("general/noaccess.php");
|
||||||
|
@ -169,9 +169,16 @@ if (isset($_GET["create"])) {
|
||||||
// --------------------------------
|
// --------------------------------
|
||||||
// SHOW TABLE WITH ALL RECON TASKs
|
// SHOW TABLE WITH ALL RECON TASKs
|
||||||
// --------------------------------
|
// --------------------------------
|
||||||
|
//Pandora Admin must see all columns
|
||||||
|
if (! give_acl ($config['id_user'], 0, "PM")) {
|
||||||
|
$sql = sprintf('SELECT * FROM trecon_task RT, tusuario_perfil UP WHERE
|
||||||
|
UP.id_usuario = "%s" AND UP.id_grupo = RT.id_group',
|
||||||
|
$config['id_user']);
|
||||||
|
|
||||||
|
$result = db_get_db_all_rows_sql ($sql);
|
||||||
$result = db_get_all_rows_in_table ("trecon_task");
|
} else {
|
||||||
|
$result = db_get_db_all_rows_in_table('trecon_task');
|
||||||
|
}
|
||||||
$color=1;
|
$color=1;
|
||||||
if ($result !== false) {
|
if ($result !== false) {
|
||||||
$table->head = array (__('Name'), __('Network'), __('Mode'), __('Group'), __('Incident'), __('OS'), __('Interval'), __('Ports'), __('Action'));
|
$table->head = array (__('Name'), __('Network'), __('Mode'), __('Group'), __('Incident'), __('OS'), __('Interval'), __('Ports'), __('Action'));
|
||||||
|
|
|
@ -18,7 +18,7 @@ global $config;
|
||||||
|
|
||||||
check_login ();
|
check_login ();
|
||||||
|
|
||||||
if (! check_acl ($config['id_user'], 0, "PM")) {
|
if (! check_acl ($config['id_user'], 0, "AW")) {
|
||||||
db_pandora_audit("ACL Violation",
|
db_pandora_audit("ACL Violation",
|
||||||
"Trying to access Agent Management");
|
"Trying to access Agent Management");
|
||||||
require ("general/noaccess.php");
|
require ("general/noaccess.php");
|
||||||
|
|
|
@ -20,7 +20,7 @@ require_once ("include/functions_servers.php");
|
||||||
|
|
||||||
check_login();
|
check_login();
|
||||||
|
|
||||||
if (! check_acl ($config["id_user"], 0, "PM")) {
|
if (! check_acl ($config["id_user"], 0, "AW")) {
|
||||||
db_pandora_audit("ACL Violation",
|
db_pandora_audit("ACL Violation",
|
||||||
"Trying to access Server Management");
|
"Trying to access Server Management");
|
||||||
require ("general/noaccess.php");
|
require ("general/noaccess.php");
|
||||||
|
@ -105,7 +105,11 @@ else {
|
||||||
$table->head[3] = __('Type');
|
$table->head[3] = __('Type');
|
||||||
$table->head[4] = __('Started');
|
$table->head[4] = __('Started');
|
||||||
$table->head[5] = __('Updated');
|
$table->head[5] = __('Updated');
|
||||||
$table->head[6] = __('Delete');
|
|
||||||
|
//Only Pandora Administrator can delete servers
|
||||||
|
if (give_acl ($config["id_user"], 0, "PM")) {
|
||||||
|
$table->head[6] = __('Delete');
|
||||||
|
}
|
||||||
|
|
||||||
foreach ($servers as $server) {
|
foreach ($servers as $server) {
|
||||||
if ($server['status'] == 0) {
|
if ($server['status'] == 0) {
|
||||||
|
@ -122,9 +126,13 @@ else {
|
||||||
$data[3] = $server['img'];
|
$data[3] = $server['img'];
|
||||||
$data[4] = human_time_comparation ($server["laststart"]);
|
$data[4] = human_time_comparation ($server["laststart"]);
|
||||||
$data[5] = human_time_comparation ($server["keepalive"]);
|
$data[5] = human_time_comparation ($server["keepalive"]);
|
||||||
$data[6] = '<a href="index.php?sec=gservers&sec2=godmode/servers/modificar_server&server_del='.$server["id_server"].'&delete=1">';
|
|
||||||
$data[6] .= html_print_image ('images/cross.png', true, array ('title' => __('Delete'), 'onclick' => "if (! confirm ('" . __('Modules run by this server will stop working. Do you want to continue?') ."')) return false"));
|
//Only Pandora Administrator can delete servers
|
||||||
$data[6] .= '</a>';
|
if (give_acl ($config["id_user"], 0, "PM")) {
|
||||||
|
$data[6] = '<a href="index.php?sec=gservers&sec2=godmode/servers/modificar_server&server_del='.$server["id_server"].'&delete=1">';
|
||||||
|
$data[6] .= html_print_image ('images/cross.png', true, array ('title' => __('Delete'), 'onclick' => "if (! confirm ('" . __('Modules run by this server will stop working. Do you want to continue?') ."')) return false"));
|
||||||
|
$data[6] .= '</a>';
|
||||||
|
}
|
||||||
|
|
||||||
array_push ($table->data, $data);
|
array_push ($table->data, $data);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue