ソースを参照

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
Alasdair Smith 8 年 前
親
コミット
4a1c2cf0e0

+ 3 - 0
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
 					}