Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
22c19861
Commit
22c19861
authored
Feb 26, 2020
by
Nicolò Maria Mezzopera
Committed by
Mayra Cabrera
Feb 26, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add project and group to feature flag check
- group page - project page
parent
6f54d919
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
7 additions
and
7 deletions
+7
-7
app/controllers/groups/registry/repositories_controller.rb
app/controllers/groups/registry/repositories_controller.rb
+1
-1
app/controllers/projects/registry/repositories_controller.rb
app/controllers/projects/registry/repositories_controller.rb
+1
-1
app/views/projects/registry/repositories/index.html.haml
app/views/projects/registry/repositories/index.html.haml
+1
-1
spec/controllers/groups/registry/repositories_controller_spec.rb
...ntrollers/groups/registry/repositories_controller_spec.rb
+1
-1
spec/controllers/projects/registry/repositories_controller_spec.rb
...rollers/projects/registry/repositories_controller_spec.rb
+2
-2
spec/features/projects/container_registry_spec.rb
spec/features/projects/container_registry_spec.rb
+1
-1
No files found.
app/controllers/groups/registry/repositories_controller.rb
View file @
22c19861
...
...
@@ -17,7 +17,7 @@ module Groups
serializer
=
ContainerRepositoriesSerializer
.
new
(
current_user:
current_user
)
if
Feature
.
enabled?
(
:vue_container_registry_explorer
)
if
Feature
.
enabled?
(
:vue_container_registry_explorer
,
group
)
render
json:
serializer
.
with_pagination
(
request
,
response
)
.
represent_read_only
(
@images
)
else
...
...
app/controllers/projects/registry/repositories_controller.rb
View file @
22c19861
...
...
@@ -17,7 +17,7 @@ module Projects
serializer
=
ContainerRepositoriesSerializer
.
new
(
project:
project
,
current_user:
current_user
)
if
Feature
.
enabled?
(
:vue_container_registry_explorer
)
if
Feature
.
enabled?
(
:vue_container_registry_explorer
,
project
.
group
)
render
json:
serializer
.
with_pagination
(
request
,
response
).
represent
(
@images
)
else
render
json:
serializer
.
represent
(
@images
)
...
...
app/views/projects/registry/repositories/index.html.haml
View file @
22c19861
...
...
@@ -4,7 +4,7 @@
%section
.row.registry-placeholder.prepend-bottom-10
.col-12
-
if
Feature
.
enabled?
(
:vue_container_registry_explorer
,
@project
)
-
if
Feature
.
enabled?
(
:vue_container_registry_explorer
,
@project
.
group
)
#js-container-registry
{
data:
{
endpoint:
project_container_registry_index_path
(
@project
),
project_path:
@project
.
full_path
,
"help_page_path"
=>
help_page_path
(
'user/packages/container_registry/index'
),
...
...
spec/controllers/groups/registry/repositories_controller_spec.rb
View file @
22c19861
...
...
@@ -93,7 +93,7 @@ describe Groups::Registry::RepositoriesController do
context
'with :vue_container_registry_explorer feature flag disabled'
do
before
do
stub_feature_flags
(
vue_container_registry_explorer:
false
)
stub_feature_flags
(
vue_container_registry_explorer:
{
enabled:
false
,
thing:
group
}
)
end
it
'has the correct response schema'
do
...
...
spec/controllers/projects/registry/repositories_controller_spec.rb
View file @
22c19861
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
describe
Projects
::
Registry
::
RepositoriesController
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
,
:private
)
}
before
do
...
...
@@ -88,7 +88,7 @@ describe Projects::Registry::RepositoriesController do
context
'with :vue_container_registry_explorer feature flag disabled'
do
before
do
stub_feature_flags
(
vue_container_registry_explorer:
false
)
stub_feature_flags
(
vue_container_registry_explorer:
{
enabled:
false
,
thing:
project
.
group
}
)
stub_container_registry_tags
(
repository:
project
.
full_path
,
tags:
%w[rc1 latest]
)
end
...
...
spec/features/projects/container_registry_spec.rb
View file @
22c19861
...
...
@@ -19,7 +19,7 @@ describe 'Container Registry', :js do
describe
'Registry explorer is off'
do
before
do
stub_feature_flags
(
vue_container_registry_explorer:
false
)
stub_feature_flags
(
vue_container_registry_explorer:
{
enabled:
false
,
thing:
project
.
group
}
)
end
it
'has a page title set'
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment