fix bug where you could save another user's project
This commit is contained in:
parent
43c49e9617
commit
8b13631191
1 changed files with 3 additions and 0 deletions
|
@ -52,6 +52,9 @@ export function setProjectName(event) {
|
||||||
export function saveProject() {
|
export function saveProject() {
|
||||||
return (dispatch, getState) => {
|
return (dispatch, getState) => {
|
||||||
const state = 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);
|
const formParams = Object.assign({}, state.project);
|
||||||
formParams.files = [...state.files];
|
formParams.files = [...state.files];
|
||||||
if (state.project.id) {
|
if (state.project.id) {
|
||||||
|
|
Loading…
Reference in a new issue