Skip to content

Commit 158a8ed

Browse files
committed
Supporters are not allowed to patch the conversation metadata yet
1 parent 8407d9e commit 158a8ed

File tree

1 file changed

+8
-3
lines changed
  • services/static-webserver/client/source/class/osparc/data/model

1 file changed

+8
-3
lines changed

services/static-webserver/client/source/class/osparc/data/model/Conversation.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -303,10 +303,15 @@ qx.Class.define("osparc.data.model.Conversation", {
303303
setAppointment: function(appointment) {
304304
const extraContext = this.getExtraContext() || {};
305305
extraContext["appointment"] = appointment ? appointment.toISOString() : null;
306-
return osparc.store.ConversationsSupport.getInstance().patchExtraContext(this.getConversationId(), extraContext)
307-
.then(() => {
308-
this.setExtraContext(extraContext);
306+
// OM Supporters are not allowed to patch the conversation metadata yet
307+
const backendAllowsPatch = osparc.store.Products.getInstance().amIASupportUser() ? false : true;
308+
if (backendAllowsPatch) {
309+
return osparc.store.ConversationsSupport.getInstance().patchExtraContext(this.getConversationId(), extraContext)
310+
.then(() => {
311+
this.setExtraContext(Object.assign({}, extraContext));
309312
});
313+
}
314+
return Promise.resolve(this.setExtraContext(Object.assign({}, extraContext)));
310315
},
311316
},
312317
});

0 commit comments

Comments
 (0)