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:
andrej-scinote 2025-08-20 12:27:54 +02:00 committed by GitHub
commit 291c5d3f6f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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