index a3373c24207a266b70d00c8489349d82d1f90c0b..800190568466a513409c8f6de31ded7c742d681a 100644 (file)
/* Create mail object on demand */
if (!isset($_SESSION['nagiosAccount']) || (isset($_GET['reset']) && $_GET['reset'] == 1)){
$_SESSION['nagiosAccount']= new nagiosAccount ($config, $ui->dn);
+ $_SESSION['nagiosAccount']->set_acl_base($ui->dn);
+ $_SESSION['nagiosAccount']->set_acl_category("users");
}
$nagiosAccount= $_SESSION['nagiosAccount'];
$info= "<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/openlock.png').
"\"> ".$ui->dn." ";
- echo "FIXME : user -> nagios, 102 Only display edit button if there is at least one attribute editable.";
- $info.= "<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/lamp.png').
- "\"> "._("Click the 'Edit' button below to change informations in this dialog");
- $display.= "<input type=submit name=\"edit\" value=\""._("Edit")."\">\n";
-
+ if(preg_match("/w/",$ui->get_permissions($ui->dn,"users/nagiosAccount"))){
+ $info.= "<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/lamp.png').
+ "\"> "._("Click the 'Edit' button below to change informations in this dialog");
+ $display.= "<input type=submit name=\"edit\" value=\""._("Edit")."\">\n";
+ }
$display.= "<input type=\"hidden\" name=\"ignore\">\n";
}
$display.= "</p>\n";