Associate code harbor links with current user always

- this applies to creations and updates
- code harbor links are only every edited in the context of the
  authenticated user

(leoselig/codeocean#1)
This commit is contained in:
leo.selig
2016-02-12 11:03:17 +01:00
parent 943355d9c7
commit 71dda088d1

View File

@ -35,6 +35,7 @@ class CodeHarborLinksController < ApplicationController
# POST /code_harbor_links.json
def create
@code_harbor_link = CodeHarborLink.new(code_harbor_link_params)
@code_harbor_link.user = current_user
authorize!
create_and_respond(object: @code_harbor_link)
end