summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b3b8b2e)
raw | patch | inline | side by side (parent: b3b8b2e)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 26 Jul 2006 05:57:25 +0000 (05:57 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 26 Jul 2006 05:57:25 +0000 (05:57 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4300 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/personal/connectivity/class_phpscheduleitAccount.inc | patch | blob | history |
diff --git a/plugins/personal/connectivity/class_phpscheduleitAccount.inc b/plugins/personal/connectivity/class_phpscheduleitAccount.inc
index e6dbb2a7050835717d600b9797844c8dd4a5a50f..76cc349d548556ed26dc1aa0121282a0f7b3bfb5 100644 (file)
function execute()
{
- /* Call parent execute */
-// plugin::execute();
-
/* Show tab dialog headers */
$display= "";
$smarty->assign("wstate", "disabled");
}
- $smarty->assign('gosaphpscheduleitACL', chkacl($this->acl, 'gosaphpscheduleit'));
+ if(($this->is_account && $this->acl_is_removeable()) || (!$this->is_account && $this->acl_is_createable())) {
+ $smarty->assign('gosaphpscheduleitACL', "");
+ }else{
+ $smarty->assign('gosaphpscheduleitACL', " disabled ");
+ }
$display.= $smarty->fetch (get_template_path('phpscheduleit.tpl', TRUE, dirname(__FILE__)));
return ($display);
function remove_from_parent()
{
/* Cancel if there's nothing to do here */
- if (!$this->initially_was_account){
- return;
- }
+ if ($this->acl_is_removeable()){
- plugin::remove_from_parent();
- $ldap= $this->config->get_ldap_link();
+ plugin::remove_from_parent();
+ $ldap= $this->config->get_ldap_link();
- $ldap->cd($this->dn);
- @DEBUG (DEBUG_LDAP, __LINE__, __FUNCTION__, __FILE__,
- $this->attributes, "Save");
- $this->cleanup();
- $ldap->modify ($this->attrs);
- show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/PHPscheduleit account with dn '%s' failed."),$this->dn));
+ $ldap->cd($this->dn);
+ @DEBUG (DEBUG_LDAP, __LINE__, __FUNCTION__, __FILE__,
+ $this->attributes, "Save");
+ $this->cleanup();
+ $ldap->modify ($this->attrs);
+ show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/PHPscheduleit account with dn '%s' failed."),$this->dn));
- /* Optionally execute a command after we're done */
- $this->handle_post_events('remove');
+ /* Optionally execute a command after we're done */
+ $this->handle_post_events('remove');
+ }
}
if (isset($_POST['connectivityTab'])){
if (isset($_POST['phpscheduleit'])){
if (!$this->is_account && $_POST['phpscheduleit'] == "B"){
- $this->is_account= TRUE;
+ if($this->acl_is_createable()) {
+ $this->is_account= TRUE;
+ }
}
} else {
- $this->is_account= FALSE;
+ if($this->acl_is_removeable()){
+ $this->is_account= FALSE;
+ }
}
}
"plShortName" => _("PHP Schedule it"),
"plDescription" => _("PHP Schedule it settings"),
"plSelfModify" => TRUE,
- "plDepends" => array("connectivity"),
+ "plDepends" => array("user"),
"plPriority" => 6, // Position in tabs
"plSection" => "personal", // This belongs to personal
- "plCategory" => array("gosaAccount"),
+ "plCategory" => array("users"),
"plOptions" => array(),
- "plProvidedAcls" => array(
- "phpscheduleitAccount" => "!!! FIXME "._("PHPscheduleit account"))
+ "plProvidedAcls" => array()
));
}
}