fix bug where you could save another user's project

This commit is contained in:
catarak 2016-08-12 13:31:34 -04:00
parent 43c49e9617
commit 8b13631191

View file

@ -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) {