summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a45c0c3)
raw | patch | inline | side by side (parent: a45c0c3)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 11 Aug 2006 05:06:24 +0000 (05:06 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 11 Aug 2006 05:06:24 +0000 (05:06 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4474 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/personal/environment/class_environment.inc | patch | blob | history |
diff --git a/plugins/personal/environment/class_environment.inc b/plugins/personal/environment/class_environment.inc
index c86f52d00c80f2884b202355ff7b5f554dea0190..55a9216a1efda8cb9550849fe17ce98bac5f4b41 100644 (file)
/* Get all Posted vars
* Setup checkboxes
*/
-
+ $WriteOnly = (!isset($this->parent)|| !$this->parent) && !isset($_SESSION['edit']);
if(isset($_POST['iamposted'])){
- if(isset($_POST['useProfile'])){
- $this->useProfile = true;
- }else{
- $this->useProfile = false;
+
+ $PACL = $this->getacl("gotoProfileServer",$WriteOnly).$this->getacl("gotoProfileQuota",$WriteOnly);
+
+ if(preg_match("/w/",$PACL)){
+ if(isset($_POST['useProfile'])){
+ $this->useProfile = true;
+ }else{
+ $this->useProfile = false;
+ }
}
- if(isset($_POST['gotoProfileFlagC'])){
- $this->gotoProfileFlagC = $_POST['gotoProfileFlagC'];
- }else{
- $this->gotoProfileFlagC = false;
+
+ if($this->acl_is_writeable("gotoProfileFlagC")){
+ if(isset($_POST['gotoProfileFlagC'])){
+ $this->gotoProfileFlagC = $_POST['gotoProfileFlagC'];
+ }else{
+ $this->gotoProfileFlagC = false;
+ }
}
- if(isset($_POST['gotoProfileFlagL'])){
- $this->gotoProfileFlagL = $_POST['gotoProfileFlagL'];
- }else{
- $this->gotoProfileFlagL = false;
+
+ if($this->acl_is_writeable("gotoProfileFlagL")){
+ if(isset($_POST['gotoProfileFlagL'])){
+ $this->gotoProfileFlagL = $_POST['gotoProfileFlagL'];
+ }else{
+ $this->gotoProfileFlagL = false;
+ }
}
- $tmp= $this->gosaDefaultPrinter;
plugin::save_object();
foreach($this->attributes as $s_attr){
- if(in_array($s_attr,array("gotoShares","gotoHotplugDevices","gotoPrinter","gotoLogonScripts","uid"))) continue;
- if(isset($_POST[$s_attr])){
- $this->$s_attr = $_POST[$s_attr];
- }else{
- $this->$s_attr = false;
+ if((!isset($_POST[$s_attr])) ||
+ in_array($s_attr,array("gosaDefaultPrinter","gotoShares","gotoHotplugDevices","gotoPrinter","gotoLogonScripts","uid"))) continue;
+ if(!$this->acl_is_writeable($s_attr)){
+ continue;
+ }else{
+ if(isset($_POST[$s_attr])){
+ $this->$s_attr = $_POST[$s_attr];
+ }else{
+ $this->$s_attr = false;
+ }
}
}
- $this->gosaDefaultPrinter= $tmp;
}
}