diff --git a/plugins/personal/connectivity/class_kolabAccount.inc b/plugins/personal/connectivity/class_kolabAccount.inc
index 8fe31efabcb310f335f12cbdd9c64fd3d146cdcc..84ea03a2515fe46958fb50a86dd8fe3cce39af75 100644 (file)
/* Helper */
var $imapping= array();
var $mail_Account = false;
+ var $ReadOnly = false;
function kolabAccount ($config, $dn= NULL)
{
$tmp = $this->plInfo();
foreach($tmp['plProvidedAcls'] as $acl => $description){
- $smarty->assign($acl."ACL",$this->getacl($acl));
- $smarty->assign($acl."_W", $this->acl_is_writeable($acl));
+ $smarty->assign($acl."ACL",$this->getacl($acl,$this->ReadOnly));
+ $smarty->assign($acl."_W", $this->acl_is_writeable($acl,$this->ReadOnly));
}
$smarty->assign("is_account" , $this->is_account);
- $smarty->assign("is_removeable",$this->acl_is_removeable());
- $smarty->assign("is_createable",$this->acl_is_createable());
+
+ if($this->ReadOnly){
+ $smarty->assign("is_removeable",false);
+ $smarty->assign("is_createable",false);
+ }else{
+ $smarty->assign("is_removeable",$this->acl_is_removeable());
+ $smarty->assign("is_createable",$this->acl_is_createable());
+ }
/* Check for invitation action */
$nr= 0;
if (isset($_POST['connectivityTab'])){
if(isset($_POST["kolabState"])){
- $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;
+ }
}
-
- if (chkacl('unrestrictedMailSize', $this->acl == "")){
+
+ if ($this->acl_is_writeable("unrestrictedMailSize")){
if (isset($_POST['unrestrictedMailSize']) && $_POST['unrestrictedMailSize'] == 1){
$this->unrestrictedMailSize= 1;
} else {
plugin::save_object();
/* Save changes done in invitation policies */
- $nr= 0;
- $this->kolabInvitationPolicy= array();
- while (isset($_POST["policy$nr"])){
+ if($this->acl_is_writeable("kolabInvitationPolicy")){
+ $nr= 0;
+ $this->kolabInvitationPolicy= array();
+ while (isset($_POST["policy$nr"])){
+
+ /* Anonymous? */
+ if (!isset($_POST["address$nr"])){
+ $this->kolabInvitationPolicy[]= $_POST["policy$nr"];
+ } else {
+ $this->kolabInvitationPolicy[]= $_POST["address$nr"].": ".$_POST["policy$nr"];
+ }
- /* Anonymous? */
- if (!isset($_POST["address$nr"])){
- $this->kolabInvitationPolicy[]= $_POST["policy$nr"];
- } else {
- $this->kolabInvitationPolicy[]= $_POST["address$nr"].": ".$_POST["policy$nr"];
+ $nr++;
}
-
- $nr++;
- }
-
- /* If this one is empty, preset with ACT_MANUAL for anonymous users */
- if (count ($this->kolabInvitationPolicy) == 0){
- $this->kolabInvitationPolicy= array("ACT_MANUAL");
- }
+ /* If this one is empty, preset with ACT_MANUAL for anonymous users */
+ if (count ($this->kolabInvitationPolicy) == 0){
+ $this->kolabInvitationPolicy= array("ACT_MANUAL");
+ }
+ }
}