Commit eb26755d authored by Kamil Trzcinski's avatar Kamil Trzcinski

Create_deployment ability is need to create retry or rollback deployment

parent 2bed8db9
...@@ -249,8 +249,7 @@ class Ability ...@@ -249,8 +249,7 @@ class Ability
:create_container_image, :create_container_image,
:update_container_image, :update_container_image,
:create_environment, :create_environment,
:create_deployment, :create_deployment
:update_deployment
] ]
end end
...@@ -269,6 +268,7 @@ class Ability ...@@ -269,6 +268,7 @@ class Ability
:push_code_to_protected_branches, :push_code_to_protected_branches,
:update_project_snippet, :update_project_snippet,
:update_environment, :update_environment,
:update_deployment,
:admin_milestone, :admin_milestone,
:admin_project_snippet, :admin_project_snippet,
:admin_project_member, :admin_project_member,
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#{time_ago_with_tooltip(deployment.created_at)} #{time_ago_with_tooltip(deployment.created_at)}
%td %td
- if can?(current_user, :update_deployment, deployment) && deployment.deployable - if can?(current_user, :create_deployment, deployment) && deployment.deployable
.pull-right .pull-right
= link_to retry_namespace_project_build_path(@project.namespace, @project, deployment.deployable), method: :post, class: 'btn btn-build' do = link_to retry_namespace_project_build_path(@project.namespace, @project, deployment.deployable), method: :post, class: 'btn btn-build' do
- if deployment.last? - if deployment.last?
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment