From 8b13631191c5016976eb3b00ec3ccc1ef8ed7ca8 Mon Sep 17 00:00:00 2001 From: catarak Date: Fri, 12 Aug 2016 13:31:34 -0400 Subject: [PATCH] fix bug where you could save another user's project --- client/modules/IDE/actions/project.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/client/modules/IDE/actions/project.js b/client/modules/IDE/actions/project.js index 3737b968..d541a49f 100644 --- a/client/modules/IDE/actions/project.js +++ b/client/modules/IDE/actions/project.js @@ -52,6 +52,9 @@ export function setProjectName(event) { export function saveProject() { return (dispatch, getState) => { const state = getState(); + if (state.user.id && state.project.owner && state.project.owner.id !== state.user.id) { + return; + } const formParams = Object.assign({}, state.project); formParams.files = [...state.files]; if (state.project.id) {