summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: dc65f09)
raw | patch | inline | side by side (parent: dc65f09)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 30 Nov 2005 07:27:37 +0000 (07:27 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 30 Nov 2005 07:27:37 +0000 (07:27 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2137 594d385d-05f5-0310-b6e9-bd551577e9d8
15 files changed:
diff --git a/plugins/personal/connectivity/class_connectivity.inc b/plugins/personal/connectivity/class_connectivity.inc
index 767d50d5dff09b4175befd1ca15dac1a404fd67c..1cad08b5d0cc9ca6f9a5b07333b1a4ac562bd8ba 100644 (file)
/* Execude objects */
$is_first= true;
foreach ($this->plugin_name as $name){
- if (!$this->plugin[$name]->is_account && $this->parent == NULL) continue;
if (!$is_first){
$display.= '<p class="seperator"> </p>';
} else {
diff --git a/plugins/personal/connectivity/class_intranetAccount.inc b/plugins/personal/connectivity/class_intranetAccount.inc
index 68644e122b319320f2479eb2c87101a87ac3aa9e..067b3ed07d143fc1dbf2ef40551a3aa74fb89ed4 100644 (file)
*/
function remove_from_parent()
{
- plugin::remove_from_parent();
- $ldap= $this->config->get_ldap_link();
-
- $ldap->cd($this->dn);
- @DEBUG (DEBUG_LDAP, __LINE__, __FUNCTION__, __FILE__,
- $this->attributes, "Save");
- $ldap->modify($this->attrs);
- show_ldap_error($ldap->get_error());
-
- /* Optionally execute a command after we're done */
- $this->postremove();
+ if(chkacl($this->acl, 'intranetAccount') == ""){
+ plugin::remove_from_parent();
+ $ldap= $this->config->get_ldap_link();
+
+ $ldap->cd($this->dn);
+ @DEBUG (DEBUG_LDAP, __LINE__, __FUNCTION__, __FILE__,
+ $this->attributes, "Save");
+ $ldap->modify($this->attrs);
+ show_ldap_error($ldap->get_error());
+
+ /* Optionally execute a command after we're done */
+ $this->postremove();
+ }
}
*/
function save()
{
- plugin::save();
-
- /* Write back to ldap */
- $ldap= $this->config->get_ldap_link();
- $ldap->cd($this->dn);
- $ldap->modify($this->attrs);
- show_ldap_error($ldap->get_error());
-
- /* Optionally execute a command after we're done */
- $this->postcreate();
+ if(chkacl($this->acl, 'intranetAccount') == ""){
+ plugin::save();
+
+ /* Write back to ldap */
+ $ldap= $this->config->get_ldap_link();
+ $ldap->cd($this->dn);
+ $ldap->modify($this->attrs);
+ show_ldap_error($ldap->get_error());
+
+ /* Optionally execute a command after we're done */
+ $this->postcreate();
+ }
}
}
diff --git a/plugins/personal/connectivity/class_phpgwAccount.inc b/plugins/personal/connectivity/class_phpgwAccount.inc
index aa38d18780fe450c18b1be3d5261e3922aa3011c..4e79a2f12b9a2b518a0c7834b88b431baa5892c2 100644 (file)
{
/* Call parent execute */
// plugin::execute();
-
+
/* Show tab dialog headers */
$display= "";
$smarty->assign("phpgwState", "checked");
} else {
$smarty->assign("phpgwState", "");
- $smarty->assign("fstate", "disabled");
- }
-
- if ($this->parent != NULL){
- $smarty->assign("tabbed", 1);
- }else{
- $smarty->assign("tabbed", 0);
}
$smarty->assign('phpgwAccountACL', chkacl($this->acl, 'phpgwAccount'));
function remove_from_parent()
{
- if ($this->parent != NULL){
+ if(chkacl($this->acl,"phpgwAccount") == ""){
/* Cancel if there's nothing to do here */
if (!$this->initially_was_account){
return;
/* Save to LDAP */
function save()
{
- plugin::save();
- if ($this->parent != NULL){
+ if(chkacl($this->acl,"phpgwAccount") == ""){
+ plugin::save();
+
/* Write back to ldap */
$ldap= $this->config->get_ldap_link();
$ldap->cd($this->dn);
} else {
$this->handle_post_events("add");
}
- }
+ }
}
-
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
diff --git a/plugins/personal/connectivity/class_phpscheduleitAccount.inc b/plugins/personal/connectivity/class_phpscheduleitAccount.inc
index 210f07bf6f8208cd5d8c374edd555892e2c88d54..775773261726530cfb4b912bdafb21bbf6bb7d25 100644 (file)
$smarty->assign("wstate", "disabled");
}
- if ($this->parent != NULL){
- $smarty->assign("tabbed", 1);
- }
-
$smarty->assign('gosaphpscheduleitACL', chkacl($this->acl, 'gosaphpscheduleit'));
$display.= $smarty->fetch (get_template_path('phpscheduleit.tpl', TRUE, dirname(__FILE__)));
diff --git a/plugins/personal/connectivity/class_pptpAccount.inc b/plugins/personal/connectivity/class_pptpAccount.inc
index 858f42a7991496c28fef33cbb4132292820aecd9..6e1076dacef2c9defe7f3a05e345ae18f216fedc 100644 (file)
$smarty->assign("wstate", "disabled");
}
- if ($this->parent != NULL){
- $smarty->assign("tabbed", 1);
- }
-
$smarty->assign('gosapptpACL', chkacl($this->acl, 'gosapptp'));
$display.= $smarty->fetch (get_template_path('pptp.tpl', TRUE, dirname(__FILE__)));
function remove_from_parent()
{
- /* Cancel if there's nothing to do here */
- if (!$this->initially_was_account){
- return;
- }
+ if(chkacl($this->acl, 'gosapptp') == ""){
+ /* Cancel if there's nothing to do here */
+ if (!$this->initially_was_account){
+ return;
+ }
- 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");
- $ldap->modify($this->attrs);
- show_ldap_error($ldap->get_error());
+ $ldap->cd($this->dn);
+ @DEBUG (DEBUG_LDAP, __LINE__, __FUNCTION__, __FILE__,
+ $this->attributes, "Save");
+ $ldap->modify($this->attrs);
+ show_ldap_error($ldap->get_error());
- /* 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');
+ }
}
/* Save to LDAP */
function save()
{
- plugin::save();
-
- /* Write back to ldap */
- $ldap= $this->config->get_ldap_link();
- $ldap->cd($this->dn);
- $ldap->modify($this->attrs);
- show_ldap_error($ldap->get_error());
-
- /* Optionally execute a command after we're done */
- if ($this->initially_was_account == $this->is_account){
- if ($this->is_modified){
- $this->handle_post_events("mofify");
+ if(chkacl($this->acl, 'gosapptp') == ""){
+ plugin::save();
+
+ /* Write back to ldap */
+ $ldap= $this->config->get_ldap_link();
+ $ldap->cd($this->dn);
+ $ldap->modify($this->attrs);
+ show_ldap_error($ldap->get_error());
+
+ /* Optionally execute a command after we're done */
+ if ($this->initially_was_account == $this->is_account){
+ if ($this->is_modified){
+ $this->handle_post_events("mofify");
+ }
+ } else {
+ $this->handle_post_events("add");
}
- } else {
- $this->handle_post_events("add");
}
-
}
}
diff --git a/plugins/personal/connectivity/class_proxyAccount.inc b/plugins/personal/connectivity/class_proxyAccount.inc
index 5ff004cdefcc1b21b48fd00f09ee4462eb510a9d..036798990778a41aa03675efc243771460ae6a93 100644 (file)
/* Prepare templating */
$smarty= get_smarty();
+ $smarty->assign("proxyAccountACL", chkacl($this->acl, "proxyAccount"));
$smarty->assign("gosaProxyAcctFlagsACL", chkacl($this->acl, "gosaProxyAcctFlags"));
$smarty->assign("gosaProxyWorkingStartACL", chkacl($this->acl, "gosaProxyWorkingStart"));
$smarty->assign("gosaProxyWorkingStopACL", chkacl($this->acl, "gosaProxyWorkingStop"));
$smarty->assign("pstate", "");
}
+ $changeA = "";
+
+ if(chkacl($this->acl,"gosaProxyAcctFlags")==""){
+ $changeA .="changeState('filterF');\n";
+ }
+ $smarty->assign("Working_allowedACL","disabled");
+ if((chkacl($this->acl,"gosaProxyWorkingStart")=="")||(chkacl($this->acl,"gosaProxyWorkingStop")=="")){
+ $smarty->assign("Working_allowedACL","");
+ $changeA .= "changeState('filterT');\n";
+ }
+
+ $ProxyWorkingStateChange ="";
+ if(chkacl($this->acl,"gosaProxyWorkingStart")==""){
+ $ProxyWorkingStateChange.= "changeState('startHour');\n";
+ $ProxyWorkingStateChange.= "changeState('startMinute');\n";
+ }
+
+ if(chkacl($this->acl,"gosaProxyWorkingStop")=="") {
+ $ProxyWorkingStateChange.= "changeState('stopHour');\n";
+ $ProxyWorkingStateChange.= "changeState('stopMinute');\n";
+ }
+
+ $changeA .= $ProxyWorkingStateChange;
+
+ $smarty->assign("ProxyWorkingStateChange",$ProxyWorkingStateChange);
+
+ $changeB = "";
+ if(chkacl($this->acl,"gosaProxyQuota")==""){
+ $changeA .= "changeState('filterB');";
+ $changeB =
+ "changeSubselectState('filterB', 'quota_size');
+ changeSubselectState('filterB', 'quota_unit');
+ changeSubselectState('filterB', 'gosaProxyQuotaPeriod');";
+ }
+
+ $smarty->assign("changeB",$changeB);
+ $smarty->assign("changeA",$changeA);
+
/* Show main page */
$display.= $smarty->fetch(get_template_path('proxy.tpl', TRUE, dirname(__FILE__)));
return($display);
}
/* Save time values */
- if (chkacl ($this->acl, "gosaProxyWorkingTime") == "" && isset($_POST['startMinute'])){
+ if ((chkacl ($this->acl, "gosaProxyWorkingStart") == "")&&(isset($_POST['startMinute']))){
$old= $this->gosaProxyWorkingStart;
$this->gosaProxyWorkingStart= $_POST["startHour"] * 60 + $_POST["startMinute"];
$this->is_modified= ($old != $this->gosaProxyWorkingStart)?TRUE:$this->is_modified;
+ }
+
+ if ((chkacl ($this->acl, "gosaProxyWorkingStop") == "")&&(isset($_POST['stopMinute']))){
$old= $this->gosaProxyWorkingStop;
$this->gosaProxyWorkingStop = $_POST["stopHour"] * 60 + $_POST["stopMinute"];
$this->is_modified= ($old != $this->gosaProxyWorkingStop)?TRUE:$this->is_modified;
diff --git a/plugins/personal/connectivity/class_pureftpdAccount.inc b/plugins/personal/connectivity/class_pureftpdAccount.inc
index 66dc9faa6b119dfdd30de6998aaff2e99d0f9be0..ee36f2ae0322a34bbb25f6f7a76ec8877cac3d56 100644 (file)
}
$smarty->assign("use_FTPStatus", ($this->FTPStatus == "disabled") ? "checked" : "");
- # Hickert, Added Else. Smarty have to know the variable in both cases
- if ($this->parent != NULL){
- $smarty->assign("tabbed", 1);
- }else {
- $smarty->assign("tabbed", 0);
- }
-
$smarty->assign("pureftpdACL", chkacl($this->acl, 'pureftpd'));
+ $changeState = "";
+ foreach($this->attributes as $attr){
+ $smarty->assign($attr."ACL",chkacl($this->acl,$attr));
+ if(chkacl($this->acl,$attr)==""){
+ $changeState .= "changeState('".$attr."');\n";
+ }
+ }
+ $smarty->assign("changeState",$changeState);
$display.= $smarty->fetch (get_template_path('pureftpd.tpl', TRUE, dirname(__FILE__)));
return ($display);
}
/* Check for positive integer values */
if ($this->is_account){
- if (!is_id($this->FTPUploadBandwidth)){
+ if ((!is_id($this->FTPUploadBandwidth))&&(chkacl($this->acl,"FTPUploadBandwidth")=="")){
$message[]= _("Value specified as 'Upload bandwidth' is not valid.");
}
- if (!is_id($this->FTPDownloadBandwidth)){
+ if ((!is_id($this->FTPDownloadBandwidth))&&(chkacl($this->acl,"FTPDownloadBandwidth")=="")){
$message[]= _("Value specified as 'Download bandwidth' is not valid.");
}
- if (!is_id($this->FTPQuotaFiles)){
+ if ((!is_id($this->FTPQuotaFiles))&&(chkacl($this->acl,"FTPQuotaFiles")=="")){
$message[]= _("Value specified as 'Files' is not valid.");
}
- if (!is_id($this->FTPQuotaMBytes)){
+ if ((!is_id($this->FTPQuotaMBytes))&&(chkacl($this->acl,"FTPQuotaMBytes")=="")){
$message[]= _("Value specified as 'Size' is not valid.");
}
- if (!is_id($this->FTPUploadRatio) || !is_id($this->FTPDownloadRatio)){
+ if ((!is_id($this->FTPUploadRatio) || !is_id($this->FTPDownloadRatio))&&(chkacl($this->acl,"FTPUploadRatio")=="")&&(chkacl($this->acl,"FTPDownloadRatio")=="")){
$message[]= _("Value specified as 'Ratio' is not valid.");
}
}
{
plugin::save();
+ foreach($this->attributes as $attr){
+ if(chkacl($this->acl,$attr)!=""){
+ unset($this->attrs[$attr]);
+ }
+ }
+
/* Write back to ldap */
$ldap= $this->config->get_ldap_link();
$ldap->cd($this->dn);
diff --git a/plugins/personal/connectivity/class_webdavAccount.inc b/plugins/personal/connectivity/class_webdavAccount.inc
index 0f4bf36bb13fa77d78b9ac0a72d46785d9512821..c917e2bd6d3aa6eed323142cdbacd66e37c71e47 100644 (file)
$smarty->assign("tabbed", 1);
}
- $smarty->assign('gosaWebdavACL', chkacl($this->acl, 'gosaWebdav'));
+ $smarty->assign('webdavAccountACL', chkacl($this->acl, 'webdavAccount'));
$display.= $smarty->fetch (get_template_path('webdav.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(chkacl($this->acl,"webdavAccount")==""){
+ /* Cancel if there's nothing to do here */
+ if (!$this->initially_was_account){
+ return;
+ }
- 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");
- $ldap->modify($this->attrs);
- show_ldap_error($ldap->get_error());
+ $ldap->cd($this->dn);
+ @DEBUG (DEBUG_LDAP, __LINE__, __FUNCTION__, __FILE__,
+ $this->attributes, "Save");
+ $ldap->modify($this->attrs);
+ show_ldap_error($ldap->get_error());
- /* 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');
+ }
}
/* Save to LDAP */
function save()
{
- plugin::save();
-
- /* Write back to ldap */
- $ldap= $this->config->get_ldap_link();
- $ldap->cd($this->dn);
- $ldap->modify($this->attrs);
- show_ldap_error($ldap->get_error());
-
- /* Optionally execute a command after we're done */
- if ($this->initially_was_account == $this->is_account){
- if ($this->is_modified){
- $this->handle_post_events("mofify");
+ if(chkacl($this->acl,"webdavAccount")==""){
+ plugin::save();
+
+ /* Write back to ldap */
+ $ldap= $this->config->get_ldap_link();
+ $ldap->cd($this->dn);
+ $ldap->modify($this->attrs);
+ show_ldap_error($ldap->get_error());
+
+ /* Optionally execute a command after we're done */
+ if ($this->initially_was_account == $this->is_account){
+ if ($this->is_modified){
+ $this->handle_post_events("mofify");
+ }
+ } else {
+ $this->handle_post_events("add");
}
- } else {
- $this->handle_post_events("add");
}
-
}
}
diff --git a/plugins/personal/connectivity/intranet.tpl b/plugins/personal/connectivity/intranet.tpl
index 4c119cb613ba2b0f552983bf5ee544b2f51fb316..f768285feb481b414cdefb7aa13425c390a12ed0 100644 (file)
-<h2>{if $tabbed eq 1}<input type="checkbox" name="intranet" value="B" {$intranetState} {$gosaIntranetACL}>{/if}{t}Intranet account{/t}</h2>
+<h2>
+ <input type="checkbox" name="intranet" value="B" {$intranetState} {$gosaIntranetACL}>
+ {t}Intranet account{/t}
+</h2>
index a4913d125d2e7788afd38b4112911ae6faa527fc..299da67162db24bf52d9d2aeecad805369e9991f 100644 (file)
-<h2>{if $tabbed eq 1}<input type="checkbox" name="phpgw" value="B" {$phpgwState} {$phpgwAccountACL}>{/if}{t}PHPGroupware account{/t}</h2>
+<h2>
+ <input type="checkbox" name="phpgw" value="B" {$phpgwState} {$phpgwAccountACL}>
+ {t}PHPGroupware account{/t}
+</h2>
diff --git a/plugins/personal/connectivity/phpscheduleit.tpl b/plugins/personal/connectivity/phpscheduleit.tpl
index f3ca92638e9357b0096c05600a7b09bd448f8979..7e5510c3fb622af94dd24046609f143dc46db490 100644 (file)
-<h2>{if $tabbed eq 1}<input type="checkbox" name="phpscheduleit" value="B" {$phpscheduleitState} {$gosaphpscheduleitACL}>{/if}{t}PHPscheduleit account{/t}</h2>
+<h2>
+ <input type="checkbox" name="phpscheduleit" value="B" {$phpscheduleitState} {$gosaphpscheduleitACL}>
+ {t}PHPscheduleit account{/t}
+</h2>
index 961d23fa48eafbadef8ed33a8d22bb97b10c360a..15d28a7924a503b276ca89fb6933cdcb5fa53034 100644 (file)
-<h2>{if $tabbed eq 1}<input type="checkbox" name="pptp" value="B" {$pptpState} {$gosapptpACL}>{/if}{t}PPTP account{/t}</h2>
+<h2>
+ <input type="checkbox" name="pptp" value="B" {$pptpState} {$gosapptpACL}>
+ {t}PPTP account{/t}
+</h2>
index adaa5100b6ffe8c75b1c130b5e64617b038974e5..4cfc13e84abc5aba53c43be77768e8a2479d536a 100644 (file)
<h2>
- {if $tabbed eq 1}
- <input type="checkbox" id="proxy" name="proxy" value="B" {$proxyState} {$gosaProxyAcctFlagsACL}
+ <input type="checkbox" id="proxy" name="proxy" value="B" {$proxyState} {$proxyAccountACL}
onClick="
- changeState('filterF');
- changeState('filterT');
- changeState('filterB');
- changeTripleSelectState('proxy', 'filterT', 'startHour');
- changeTripleSelectState('proxy', 'filterT', 'startMinute');
- changeTripleSelectState('proxy', 'filterT', 'stopHour');
- changeTripleSelectState('proxy', 'filterT', 'stopMinute');
+ {$changeA}
changeTripleSelectState('proxy', 'filterB', 'quota_size');
changeTripleSelectState('proxy', 'filterB', 'quota_unit');
changeTripleSelectState('proxy', 'filterB', 'gosaProxyQuotaPeriod');
">
- {/if}{t}Proxy account{/t}</h2>
+ {t}Proxy account{/t}</h2>
<table summary="" style="width:100%; vertical-align:top; text-align:left;" cellpadding=0 border=0>
<tr>
</td></tr>
<tr>
<td width="50%">
- <input type="checkbox" name="filterT" id="filterT" value="T" {$filterT} {$gosaProxyAcctFlagsACL} {$pstate}
- onClick="
- changeSubselectState('filterT', 'startHour');
- changeSubselectState('filterT', 'startMinute');
- changeSubselectState('filterT', 'stopHour');
- changeSubselectState('filterT', 'stopMinute');
- ">
+ <input type="checkbox" name="filterT" id="filterT" value="T" {$filterT} {$Working_allowedACL} {$pstate}
+ onClick="{$ProxyWorkingStateChange}">
<LABEL for="startHour">{t}Limit proxy access to working time{/t}</LABEL>
<br>
<table summary="" style="margin-left:20px;">
</td>
<td>
- <input type="checkbox" id="filterB" name="filterB" value="B" {$filterB} {$pstate} {$gosaProxyAcctFlagsACL}
- onClick="
- changeSubselectState('filterB', 'quota_size');
- changeSubselectState('filterB', 'quota_unit');
- changeSubselectState('filterB', 'gosaProxyQuotaPeriod');
- ">
+ <input type="checkbox" id="filterB" name="filterB" value="B" {$filterB} {$pstate} {$gosaProxyAcctFlagsACL} {$gosaProxyQuotaACL}
+ onClick="{$changeB}">
<LABEL for="quota_size">{t}Restrict proxy usage by quota{/t}</LABEL>
<br>
<table summary="" style="margin-left:20px;">
diff --git a/plugins/personal/connectivity/pureftpd.tpl b/plugins/personal/connectivity/pureftpd.tpl
index cb6557ed153c11372e5c1afd8688003f079249bf..2dc1ca313cfa8170b5ff50125498f2e5867b61c6 100644 (file)
-<h2>{if $tabbed eq 1}<input type="checkbox" name="pureftpd" value="B" {$pureftpdState} {$pureftpdACL} onclick="changeState('FTPUploadBandwidth'); changeState('FTPDownloadBandwidth'); changeState('FTPQuotaFiles'); changeState('FTPQuotaMBytes'); changeState('FTPUploadRatio'); changeState('FTPDownloadRatio'); changeState('FTPStatus');" {$pureftpdACL}>{/if}{t}FTP account{/t}</h2>
+<h2>
+ <input type="checkbox" name="pureftpd" value="B" {$pureftpdState} {$pureftpdACL}
+ onclick="{$changeState}" >
+ {t}FTP account{/t}
+</h2>
<table summary="" style="width:100%; vertical-align:top; text-align:left;" cellpadding=0 border=0>
index 14fbf3fe9d96971f0b9fdcadb2deeef35e75e9a3..ecd567cd3ba9523db04467400ef6f448bc95aa00 100644 (file)
-<h2>{if $tabbed eq 1}<input type="checkbox" name="webdav" value="B" {$webdavState} {$gosaWebdavACL}>{/if}{t}WebDAV account{/t}</h2>
+<h2>
+ <input type="checkbox" name="webdav" value="B" {$webdavState} {$webdavAccountACL}>
+ {t}WebDAV account{/t}
+</h2>