Code

Fixed snapshot restore && create acl checks
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 29 May 2008 09:59:07 +0000 (09:59 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 29 May 2008 09:59:07 +0000 (09:59 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11103 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/include/class_plugin.inc

index 1c7b2d87c7bd560171623c0e13a58d592e008047..8ed7173a5fbae10552f0c43f28d4943136bc297f 100644 (file)
@@ -1979,7 +1979,7 @@ class plugin
   {
     $str= ""; 
     $ui = get_userinfo();
-    if($this->snapshotEnabled() && $ui->allow_snapshot_create($base,$category)){
+    if($this->snapshotEnabled() && $ui->allow_snapshot_restore($base,$category)){
 
       if(count($this->Available_SnapsShots($base))){
         $str.= "<input class='center' type='image' src='images/lists/restore.png'
@@ -1987,10 +1987,13 @@ class plugin
       } else {
         $str = "<img class='center' src='images/lists/restore_grey.png' alt=''>&nbsp;";
       }
-
+    }
+    if($this->snapshotEnabled() && $ui->allow_snapshot_create($base,$category)){
       $str.= "<input class='center' type='image' src='images/snapshot.png'
         alt='"._("Create snapshot")."' name='CreateSnapShotDialog_".base64_encode($base)."' 
         title='"._("Create a new snapshot from this object")."'>&nbsp;";
+    }else{
+      $str = "<img class='center' src='images/empty.png' alt=' '>&nbsp;";
     }
 
     return($str);