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
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
c275c913
Commit
c275c913
authored
May 14, 2016
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change abilities from container_registry to container_image
parent
f63b6fc2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
5 deletions
+5
-5
app/controllers/projects/container_registry_controller.rb
app/controllers/projects/container_registry_controller.rb
+2
-2
app/helpers/projects_helper.rb
app/helpers/projects_helper.rb
+1
-1
app/views/projects/container_registry/_tag.html.haml
app/views/projects/container_registry/_tag.html.haml
+1
-1
app/views/projects/container_registry/index.html.haml
app/views/projects/container_registry/index.html.haml
+1
-1
No files found.
app/controllers/projects/container_registry_controller.rb
View file @
c275c913
class
Projects::ContainerRegistryController
<
Projects
::
ApplicationController
before_action
:authorize_read_container_
registry
!
before_action
:authorize_update_container_
registry
!
,
only:
[
:destroy
]
before_action
:authorize_read_container_
image
!
before_action
:authorize_update_container_
image
!
,
only:
[
:destroy
]
layout
'project'
def
index
...
...
app/helpers/projects_helper.rb
View file @
c275c913
...
...
@@ -152,7 +152,7 @@ module ProjectsHelper
nav_tabs
<<
:builds
end
if
can?
(
current_user
,
:read_container_
registry
,
project
)
if
can?
(
current_user
,
:read_container_
image
,
project
)
nav_tabs
<<
:container_registry
end
...
...
app/views/projects/container_registry/_tag.html.haml
View file @
c275c913
...
...
@@ -14,7 +14,7 @@
=
pluralize
(
tag
.
layers
.
size
,
"layer"
)
%td
=
time_ago_in_words
(
tag
.
created_at
)
-
if
can?
(
current_user
,
:update_container_
registry
,
@project
)
-
if
can?
(
current_user
,
:update_container_
image
,
@project
)
%td
.content
.controls.hidden-xs.pull-right
=
link_to
namespace_project_container_registry_path
(
@project
.
namespace
,
@project
,
tag
.
name
),
class:
'btn btn-remove has-tooltip'
,
title:
"Remove"
,
data:
{
confirm:
"Are you sure?"
},
method: :delete
do
...
...
app/views/projects/container_registry/index.html.haml
View file @
c275c913
...
...
@@ -33,7 +33,7 @@
%th
Image ID
%th
Size
%th
Created
-
if
can?
(
current_user
,
:update_container_
registry
,
@project
)
-
if
can?
(
current_user
,
:update_container_
image
,
@project
)
%th
-
@tags
.
each
do
|
tag
|
...
...
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