Fix permission over ajax.
authorJan Schneider <jan@horde.org>
Fri, 3 Apr 2009 16:05:27 +0000 (18:05 +0200)
committerJan Schneider <jan@horde.org>
Fri, 3 Apr 2009 16:05:27 +0000 (18:05 +0200)
kronolith/js/src/kronolith.js
kronolith/lib/Event.php

index 7908cbf..b4f5b91 100644 (file)
@@ -1222,7 +1222,7 @@ KronolithCore = {
                     return option.value == ev.r;
                 }).selected = true;
             }
-            if (ev.ed) {
+            if (ev.pe) {
                 $('kronolithEventSave').show();
                 $('kronolithEventForm').enable();
             } else {
@@ -1230,7 +1230,7 @@ KronolithCore = {
                 $('kronolithEventForm').disable();
                 $('kronolithEventCancel').enable();
             }
-            if (ev.d) {
+            if (ev.pd) {
                 $('kronolithEventDelete').show();
             } else {
                 $('kronolithEventDelete').hide();
index 84a8e92..2201533 100644 (file)
@@ -1015,8 +1015,8 @@ abstract class Kronolith_Event
         $json->e = $this->end->toJson();
         $json->bg = $this->_backgroundColor;
         $json->fg = $this->_foregroundColor;
-        $json->ed = $this->hasPermission(PERMS_EDIT);
-        $json->d = $this->hasPermission(PERMS_DELETE);
+        $json->pe = $this->hasPermission(PERMS_EDIT);
+        $json->pd = $this->hasPermission(PERMS_DELETE);
         if ($this->alarm) {
             if ($this->alarm % 10080 == 0) {
                 $alarm_value = $this->alarm / 10080;