mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-03-05 04:03:45 +08:00
Fix permission check
This commit is contained in:
parent
1080ad2821
commit
e429c78d56
1 changed files with 1 additions and 1 deletions
|
@ -263,7 +263,7 @@ class SearchController < ApplicationController
|
|||
|
||||
def search_repository
|
||||
@repository = Repository.find_by_id(params[:repository])
|
||||
render_403 unless can_read_repository?(@repository)
|
||||
render_403 unless user.teams.include?(repository.team) || repository.private_shared_with?(user.teams)
|
||||
@repository_results = []
|
||||
if @repository_search_count_total > 0
|
||||
@repository_results =
|
||||
|
|
Loading…
Reference in a new issue