Changeset View
Changeset View
Standalone View
Standalone View
src/server/handler/store.cpp
Show First 20 Lines • Show All 232 Lines • ▼ Show 20 Line(s) | 230 | if (cmd.modifiedParts() & Protocol::ModifyItemsCommand::Tags) { | |||
---|---|---|---|---|---|
233 | } | 233 | } | ||
234 | } | 234 | } | ||
235 | 235 | | |||
236 | if (tagsChanged) { | 236 | if (tagsChanged) { | ||
237 | changes << AKONADI_PARAM_TAGS; | 237 | changes << AKONADI_PARAM_TAGS; | ||
238 | } | 238 | } | ||
239 | 239 | | |||
240 | if (item.isValid() && cmd.modifiedParts() & Protocol::ModifyItemsCommand::RemoteID) { | 240 | if (item.isValid() && cmd.modifiedParts() & Protocol::ModifyItemsCommand::RemoteID) { | ||
241 | if (item.remoteId() != cmd.remoteId()) { | 241 | if (item.remoteId() != cmd.remoteId() && !cmd.remoteId().isEmpty()) { | ||
242 | if (!connection()->isOwnerResource(item)) { | 242 | if (!connection()->isOwnerResource(item)) { | ||
243 | qWarning() << "Invalid attempt to modify the remoteID for item" << item.id() << "from" << item.remoteId() << "to" << cmd.remoteId(); | ||||
243 | return failureResponse("Only resources can modify remote identifiers"); | 244 | return failureResponse("Only resources can modify remote identifiers"); | ||
244 | } | 245 | } | ||
245 | item.setRemoteId(cmd.remoteId()); | 246 | item.setRemoteId(cmd.remoteId()); | ||
246 | changes << AKONADI_PARAM_REMOTEID; | 247 | changes << AKONADI_PARAM_REMOTEID; | ||
247 | } | 248 | } | ||
248 | } | 249 | } | ||
249 | 250 | | |||
250 | if (item.isValid() && cmd.modifiedParts() & Protocol::ModifyItemsCommand::GID) { | 251 | if (item.isValid() && cmd.modifiedParts() & Protocol::ModifyItemsCommand::GID) { | ||
▲ Show 20 Lines • Show All 136 Lines • Show Last 20 Lines |