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
ed0547b7
Commit
ed0547b7
authored
Apr 05, 2017
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Require container registry entities in controllers
parent
ee6f5002
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
app/controllers/projects/registry/repositories_controller.rb
app/controllers/projects/registry/repositories_controller.rb
+1
-1
app/controllers/projects/registry/tags_controller.rb
app/controllers/projects/registry/tags_controller.rb
+4
-2
No files found.
app/controllers/projects/registry/repositories_controller.rb
View file @
ed0547b7
...
@@ -21,7 +21,7 @@ module Projects
...
@@ -21,7 +21,7 @@ module Projects
private
private
def
image
def
image
@image
||=
project
.
container_repositories
.
find
_by
(
id:
params
[
:id
])
@image
||=
project
.
container_repositories
.
find
(
params
[
:id
])
end
end
##
##
...
...
app/controllers/projects/registry/tags_controller.rb
View file @
ed0547b7
...
@@ -17,11 +17,13 @@ module Projects
...
@@ -17,11 +17,13 @@ module Projects
def
repository
def
repository
@image
||=
project
.
container_repositories
@image
||=
project
.
container_repositories
.
find
_by
(
id:
params
[
:repository_id
])
.
find
(
params
[
:repository_id
])
end
end
def
tag
def
tag
@tag
||=
repository
.
tag
(
params
[
:id
])
if
params
[
:id
].
present?
return
render_404
unless
params
[
:id
].
present?
@tag
||=
repository
.
tag
(
params
[
:id
])
end
end
end
end
end
end
...
...
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