Fix failing tests

This commit is contained in:
Mojca Lorber 2020-08-11 13:33:44 +02:00
parent 7af9c387cf
commit 5d15e73866

View file

@ -52,9 +52,9 @@ class RepositoryRowsController < ApplicationController
def show
@repository_row = RepositoryRow.find_by(id: params[:id])
if !can_read_repository?(@repository_row.repository) || @repository_row.repository_id != params[:repository_id].to_i
return render_403
end
return render_404 unless @repository_row
return render_404 unless @repository_row.repository_id == params[:repository_id].to_i
return render_403 unless can_read_repository?(@repository_row.repository)
@assigned_modules = @repository_row.my_modules.joins(experiment: :project)
@viewable_modules = @assigned_modules.viewable_by_user(current_user, current_user.teams)