Code

Fixedd picture acls
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 19 Jul 2006 07:30:42 +0000 (07:30 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 19 Jul 2006 07:30:42 +0000 (07:30 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4226 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/personal/generic/class_user.inc

index f83bd4ca741c3cb73dfe81ac0aa2a78f844a753b..c5e234be377037f497a6524c5b61454f9a01f546 100644 (file)
@@ -301,7 +301,7 @@ class user extends plugin
     }
 
     /* Want picture edit dialog? */
-    if($this->acl_is_writeable("jpegPhoto")) {
+    if($this->acl_is_readable("userPicture")) {
       if (isset($_POST['edit_picture'])){
         /* Save values for later recovery, in case some presses
            the cancel button. */
@@ -310,8 +310,10 @@ class user extends plugin
         $this->picture_dialog= TRUE;
         $this->dialog= TRUE;
       }
+    }
 
-      /* Remove picture? */
+    /* Remove picture? */
+    if($this->acl_is_writeable("userPicture")) {
       if (isset($_POST['picture_remove'])){
         $this->jpegPhoto= "*removed*";
         $this->set_picture ("./images/default.jpg");
@@ -1132,7 +1134,7 @@ class user extends plugin
   /* Load picture from file to object */
   function set_picture($filename)
   {
-    if($this->acl_is_writeable("jpegPhoto")) {
+    if($this->acl_is_writeable("userPicture")) {
       if (!is_file($filename)){
         $filename= "./images/default.jpg";
         $this->jpegPhoto= "*removed*";