diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/group_packages.rb | 2 | ||||
-rw-r--r-- | lib/api/project_packages.rb | 4 | ||||
-rw-r--r-- | lib/gitlab/path_regex.rb | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/lib/api/group_packages.rb b/lib/api/group_packages.rb index d9010dfd329..e396c9608cf 100644 --- a/lib/api/group_packages.rb +++ b/lib/api/group_packages.rb @@ -43,7 +43,7 @@ module API declared(params).slice(:exclude_subgroups, :order_by, :sort, :package_type, :package_name, :include_versionless, :status) ).execute - present paginate(packages), with: ::API::Entities::Package, user: current_user, group: true, namespace: user_group.root_ancestor + present paginate(packages), with: ::API::Entities::Package, user: current_user, group: true, namespace: user_group end end end diff --git a/lib/api/project_packages.rb b/lib/api/project_packages.rb index 276cbe50e42..35a68ec4e18 100644 --- a/lib/api/project_packages.rb +++ b/lib/api/project_packages.rb @@ -41,7 +41,7 @@ module API declared_params.slice(:order_by, :sort, :package_type, :package_name, :include_versionless, :status) ).execute - present paginate(packages), with: ::API::Entities::Package, user: current_user, namespace: user_project.root_ancestor + present paginate(packages), with: ::API::Entities::Package, user: current_user, namespace: user_project.namespace end desc 'Get a single project package' do @@ -55,7 +55,7 @@ module API package = ::Packages::PackageFinder .new(user_project, params[:package_id]).execute - present package, with: ::API::Entities::Package, user: current_user, namespace: user_project.root_ancestor + present package, with: ::API::Entities::Package, user: current_user, namespace: user_project.namespace end desc 'Remove a package' do diff --git a/lib/gitlab/path_regex.rb b/lib/gitlab/path_regex.rb index 16a6c470213..4cb47ffc6d9 100644 --- a/lib/gitlab/path_regex.rb +++ b/lib/gitlab/path_regex.rb @@ -177,7 +177,7 @@ module Gitlab end def repository_route_regex - @repository_route_regex ||= /#{full_namespace_route_regex}|#{personal_snippet_repository_path_regex}/.freeze + @repository_route_regex ||= /(#{full_namespace_route_regex}|#{personal_snippet_repository_path_regex})\.*/.freeze end def repository_git_route_regex @@ -185,7 +185,7 @@ module Gitlab end def repository_wiki_git_route_regex - @repository_wiki_git_route_regex ||= /#{full_namespace_route_regex}\.wiki\.git/.freeze + @repository_wiki_git_route_regex ||= /#{full_namespace_route_regex}\.*\.wiki\.git/.freeze end def full_namespace_path_regex |