Fix permission check when importing data into kronolith
authorMichael J. Rubinsky <mrubinsk@horde.org>
Mon, 25 Oct 2010 16:32:48 +0000 (12:32 -0400)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Mon, 25 Oct 2010 16:32:48 +0000 (12:32 -0400)
kronolith/data.php

index 382fcfc..b53fe6e 100644 (file)
@@ -204,7 +204,7 @@ if (!$error && $import_format) {
         if ($actionID == Horde_Data::IMPORT_FILE) {
             $cleanup = true;
             try {
-                if (!in_array($_SESSION['import_data']['import_cal'], Kronolith::listCalendars(Horde_Perms::EDIT))) {
+                if (!in_array($_SESSION['import_data']['import_cal'], array_keys(Kronolith::listCalendars(Horde_Perms::EDIT)))) {
                     $notification->push(_("You do not have permission to add events to the selected calendar."), 'horde.error');
                 } else {
                     $next_step = $data->nextStep($actionID, $param);