mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-27 10:14:17 +08:00
Fix failing tests
This commit is contained in:
parent
7af9c387cf
commit
5d15e73866
1 changed files with 3 additions and 3 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue