summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 683d098)
raw | patch | inline | side by side (parent: 683d098)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 7 Sep 2010 13:35:00 +0000 (13:35 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 7 Sep 2010 13:35:00 +0000 (13:35 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19554 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 f7750dbf7306e7639698458e53a62f88dff11c10..f56b826f44a8582efc1f2ca7b21d88f0d9b37af7 100644 (file)
"localDeliveryOnly" => TRUE,
"dropOwnMails" => TRUE);
- var $flagAttrinutes = array("vacationEnabled","mailBoxWarnLimitEnabled","mailBoxSendSizelimitEnabled",
+ var $flagAttributes = array("vacationEnabled","mailBoxWarnLimitEnabled","mailBoxSendSizelimitEnabled",
"mailBoxHardSizelimitEnabled","mailBoxAutomaticRemovalEnabled","localDeliveryOnly","dropOwnMails");
var $mailAddressSelectDialog = NULL;
$this->init();
}
+
+ /*! \brief Try to execute a function on the gosa backend using json-rpc.
+ * This method also takes care about errors and sets the required
+ * class members, such as rpcError and rpcErrorMessage.
+ * @param String function The name of the function to call.
+ * @param Mixed args[0-n] The parameter to use.
+ * @return Mixed The result of the function call on success else NULL.
+ */
function rpcExec($function)
{
$params = func_get_args();
}
+ /*! \brief Try initialize the groupware account.
+ * This method fetches all required information to manage the
+ * account using the GOsa gui.
+ */
function init()
{
// Get rpc handle to fetch account info and feature availability.
$this->initially_was_account = $this->is_account = $status;
$this->accountInitialized = TRUE;
}
-
// Set vacation start/stop if not set alreasy
$this->vacationStart = time();
}
+ /*! \brief Generates the HTML user interface for the groupware plugin
+ * and take of several ui actions like adding or removing
+ * forward addresses, filters and the account itself.
+ */
function execute()
{
// Register plugin execution
- /* Save data to object */
+ /*! \brief This method handles potential _POST and _GET values.
+ * It captures modifcations from the ui, like changing
+ * the mailAddress.
+ * This method respects the attribute permissions.
+ */
function save_object()
{
if(isset($_POST['groupwarePluginPosted'])){
$this->rpcExec('getCapabilities');
}
+ // Get ui modifications and store them in the class.
foreach($this->attributes as $attr){
- if(isset($_POST[$attr])){
+ if(isset($_POST[$attr]) && $this->acl_is_writeable($attr)){
$this->$attr = get_post($attr);
}
}
- foreach($this->flagAttrinutes as $attr){
+ echo 'ACL checks missing!';
+
+ foreach($this->flagAttributes as $attr){
$this->$attr = isset($_POST[$attr]);
}
}