summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: bd784de)
raw | patch | inline | side by side (parent: bd784de)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 8 Sep 2010 08:41:41 +0000 (08:41 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 8 Sep 2010 08:41:41 +0000 (08:41 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19558 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/groupware/personal/groupware/class_groupware.inc | patch | blob | history |
diff --git a/gosa-plugins/groupware/personal/groupware/class_groupware.inc b/gosa-plugins/groupware/personal/groupware/class_groupware.inc
index f56b826f44a8582efc1f2ca7b21d88f0d9b37af7..9ac0c6271697a8e03da23776d7329999ee2336cb 100644 (file)
"dropOwnMails"
);
- var $enabledFeatures = array(
- "quotaUsage" => TRUE,
- "quotaSize" => TRUE,
- "mailFilter" => TRUE,
- "alternateAddresses" => TRUE,
- "forwardingAddresses" => TRUE,
- "vacationMessage" => TRUE,
- "mailBoxWarnLimit" => TRUE,
- "mailBoxSendSizelimit" => TRUE,
- "mailBoxHardSizelimit" => TRUE,
- "mailBoxAutomaticRemoval" => TRUE,
- "localDeliveryOnly" => TRUE,
- "dropOwnMails" => TRUE);
+ var $enabledFeatures = array();
var $flagAttributes = array("vacationEnabled","mailBoxWarnLimitEnabled","mailBoxSendSizelimitEnabled",
"mailBoxHardSizelimitEnabled","mailBoxAutomaticRemovalEnabled","localDeliveryOnly","dropOwnMails");
*/
function init()
{
+ // Detect feature availability and enable/disable services correspondingly.
+ $features = $this->rpcExec('gwGetCapabilities');
+ $featureReq = array(
+ "quotaUsage" => array(
+ 'acctGetQuota'),
+ "quotaSize" => array(
+ 'acctSetQuota','acctGetQuota'),
+ "mailFilter" => array(
+ 'acctDelFilter','acctGetFilters','acctSetFilters','acctSetFilters'),
+ "alternateAddresses" => array(
+ 'acctDelAlternateMailAddress','acctSetAlternateMailAddresses',
+ 'acctAddAlternateMailAddress','acctGetAlternateMailAddresses'),
+ "forwardingAddresses" => array(
+ 'acctAddMailForwardAddress','acctDelMailForwardAddress',
+ 'acctGetMailForwardAddresses','acctSetMailForwardAddresses'),
+ "vacationMessage" => array(
+ 'acctDelFilter','acctGetFilters','acctSetFilters','acctSetFilters'),
+ "mailBoxWarnLimit" => array(
+ 'acctSetQuota','acctGetQuota'),
+ "mailBoxSendSizelimit" => array(
+ 'acctSetQuota','acctGetQuota'),
+ "mailBoxHardSizelimit" => array(
+ 'acctSetQuota','acctGetQuota'),
+ "mailBoxAutomaticRemoval" => array(
+ 'acctSetQuota','acctGetQuota'),
+ "localDeliveryOnly" => array(
+ 'acctDelFilter','acctGetFilters','acctSetFilters','acctSetFilters'),
+ "dropOwnMails" => array(
+ 'acctDelFilter','acctGetFilters','acctSetFilters','acctSetFilters'));
+
+ foreach($featureReq as $name => $requires){
+ $active = TRUE;
+ foreach($requires as $methodName){
+ $active &= $features[$methodName];
+ }
+ $this->enabledFeatures[$name] = $active;
+ }
+
+
// Get rpc handle to fetch account info and feature availability.
$status = $this->rpcExec('gwAcctExists', $this->uid);
if($status !== NULL){
// Register plugin execution
$display = plugin::execute();
+
+ $this->accountInitialized = FALSE;
+
+
// Log plugin execution.
if($this->is_account && !$this->view_logged){
$this->view_logged = TRUE;