summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6d71e1c)
raw | patch | inline | side by side (parent: 6d71e1c)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 4 Apr 2008 07:46:33 +0000 (07:46 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 4 Apr 2008 07:46:33 +0000 (07:46 +0000) |
-Some comments
-OO functions
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10193 594d385d-05f5-0310-b6e9-bd551577e9d8
-OO functions
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10193 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/gosa-plugins/sudo/admin/sudo/class_divListSudo.inc b/gosa-plugins/sudo/admin/sudo/class_divListSudo.inc
index b83c7ba08fe09740627408052a705a2ade75fbe2..58936de8904f0d5871f9b62233a2ecaac1e24c36 100644 (file)
/* Prepare departments,
which are shown in the listbox on top of the listbox
*/
- $base = $this->parent->base;
+ $base = sudo::get_sudoers_ou($this->config);
$acl = $this->ui->get_category_permissions($base,"sudo");
/* Add default header */
diff --git a/gosa-plugins/sudo/admin/sudo/class_sudoManagement.inc b/gosa-plugins/sudo/admin/sudo/class_sudoManagement.inc
index fe78bd12ac9b7109827cf647af314b378dcfb422..4a082c1d0a74dde93abb61b8d9b5050560fd1a8a 100644 (file)
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+/*! \brief This is the sudo management class. \
+ This class allows to add/remove/edit sudo roles with GOsa. \
+ All roles will be listed by this plugin, the displayed objects \
+ can also be filtered.
+*/
class sudoManagement extends plugin
{
/* Definitions */
- var $plHeadline = "Sudo";
- var $plDescription = "Manage sudo roles";
+ public $plHeadline = "Sudo";
+ public $plDescription = "Manage sudo roles";
- var $DivListSudo = NULL;
- var $base = "";
+ private $DivListSudo = NULL;
+ private $sudotabs = NULL;
+ private $base = "";
+
- var $sudotabs = NULL;
-
- function sudoManagement (&$config, &$ui)
+
+ public function __construct(&$config, &$ui)
{
/* Save configuration for internal use */
$this->config = &$config;
}
- function execute()
+ public function execute()
{
/* Call parent execute */
plugin::execute();
unset ($this->sudotabs);
$this->sudotabs= NULL;
session::un_set('objectinfo');
+ }else{
+ $this->dn = $this->sudotabs->dn;
+ $this->sudotabs= new sudotabs($this->config, $this->config->data['TABS']['SUDOTABS'], $this->dn);
+ session::set('objectinfo',$this->dn);
}
} else {
/* Ok. There seem to be errors regarding to the tab data,
}
- function list_get_selected_items()
+ private function list_get_selected_items()
{
$ids = array();
foreach($_POST as $name => $value){
}
- function reload($CreatePosixsList=false)
+ private function reload($CreatePosixsList=false)
{
$this->list = array();
$base = $this->base;
/* Save data to object */
- function save_object()
+ public function save_object()
{
$this->DivListSudo->save_object();
}
-
- function remove_lock()
- {
- if (isset($this->sudotabs->dn)){
- del_lock ($this->sudotabs->dn);
- }
- }
-
-
- function remove_from_parent()
+ public function remove_from_parent()
{
/* Optionally execute a command after we're done */
$this->postremove();
/* Save to LDAP */
- function save()
+ public function save()
{
/* Optionally execute a command after we're done */
$this->postcreate();
}
-
- /* Unused functions */
- function check() { }
- function adapt_from_template($dn, $skip= array()) { }
- function password_change_needed() { }
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
?>
diff --git a/gosa-plugins/sudo/admin/sudo/class_sudoOptions.inc b/gosa-plugins/sudo/admin/sudo/class_sudoOptions.inc
index b9954a50378420366cee8404d3b8a6a01de68947..3b6ad7c595e0a81d85a9f4e8719cffe6cc12bf51 100644 (file)
$smarty = get_smarty();
$smarty->assign("map", array("STRING" => _("string"), "BOOLEAN" => _("bool"),
"INTEGER" => _("integer") , "BOOL_INTEGER" => _("integer")."-"._("bool") ,
- "STRING_BOOL" => _("string")."-"._("bool"),"LISTS" => _("lists")));
+ "STRING_BOOL" => _("string")."-"._("bool"),"LISTS" => _("list")));
$smarty->assign("sudoOption",$this->sudoOption);
$smarty->assign("options",$this->options);
return($smarty->fetch(get_template_path('options.tpl', TRUE)));