From 4a1c2cf0e07af4804a25908f33b4624ba5f92794 Mon Sep 17 00:00:00 2001 From: Alasdair Smith Date: Wed, 6 Jun 2018 13:44:02 +0100 Subject: [PATCH] Set cloned project's owner to current user Fixes a bug where cloning a project then selecting to delete it, the wrong button for deletion is shown (leave instead of archive/delete). This is because we are using the owner object (which was undefined after cloning) to determine which button to show --- .../web/public/coffee/main/project-list/project-list.coffee | 3 +++ 1 file changed, 3 insertions(+) diff --git a/services/web/public/coffee/main/project-list/project-list.coffee b/services/web/public/coffee/main/project-list/project-list.coffee index 6696243905..6e40bb04c1 100644 --- a/services/web/public/coffee/main/project-list/project-list.coffee +++ b/services/web/public/coffee/main/project-list/project-list.coffee @@ -320,6 +320,9 @@ define [ name: cloneName id: data.project_id accessLevel: "owner" + owner: { + _id: user_id + } # TODO: Check access level if correct after adding it in # to the rest of the app }