mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-08 14:15:35 +08:00
Merge pull request #8821 from andrej-scinote/aj_SCI_12279
Fix the repository list dropdown for creating an item from a task [SCI-12279]
This commit is contained in:
commit
291c5d3f6f
1 changed files with 4 additions and 4 deletions
|
@ -44,7 +44,9 @@ class RepositoriesController < ApplicationController
|
|||
end
|
||||
|
||||
def list
|
||||
repositories = if params[:manageable] == 'true'
|
||||
repositories = if params[:appendable] == 'true'
|
||||
Repository.appendable_by_user(current_user)
|
||||
elsif params[:manageable] == 'true'
|
||||
Repository.with_granted_permissions(current_user, RepositoryPermissions::ROWS_UPDATE, current_team)
|
||||
else
|
||||
Repository.readable_by_user(current_user, current_team)
|
||||
|
@ -487,9 +489,7 @@ class RepositoriesController < ApplicationController
|
|||
|
||||
def load_repositories
|
||||
@repositories =
|
||||
if params[:appendable] == 'true'
|
||||
Repository.appendable_by_user(current_user)
|
||||
elsif can_manage_team?(current_team)
|
||||
if can_manage_team?(current_team)
|
||||
# Team owners see all repositories in the team
|
||||
current_team.repositories.or(Repository.shared_with_team(current_team))
|
||||
else
|
||||
|
|
Loading…
Add table
Reference in a new issue