summaryrefslogtreecommitdiffstats
path: root/src/calendarstore.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/calendarstore.cpp')
-rw-r--r--src/calendarstore.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/calendarstore.cpp b/src/calendarstore.cpp
index a9efe8f..7970fdf 100644
--- a/src/calendarstore.cpp
+++ b/src/calendarstore.cpp
@@ -345,7 +345,15 @@ QList<Occurrence> occurrences(const QList<CalEvent> &events,
[](const Occurrence &a, const Occurrence &b) { return a.start < b.start; });
return result;
}
-bool isEditable(const CalEvent &, const CalCollection &, const QStringList &) { return false; }
+bool isEditable(const CalEvent &event, const CalCollection &collection,
+ const QStringList &ownAddresses)
+{
+ if (collection.readOnly)
+ return false;
+ if (event.organizer.address.isEmpty())
+ return true;
+ return ownAddresses.contains(event.organizer.address, Qt::CaseInsensitive);
+}
QByteArray applyEdit(const QByteArray &, const EventEdit &, Scope, const QDateTime &) { return {}; }
QByteArray newEvent(const EventEdit &, const QByteArray &) { return {}; }
QByteArray deleteOccurrence(const QByteArray &, const QDateTime &) { return {}; }