Commit d315d1eb authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Dont allow guest to set assigne, milestone and label when create new issue or merge request

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 60baa1e8
......@@ -154,6 +154,9 @@ class Ability
project_guest_rules + [
:download_code,
:fork_project,
:set_assignee,
:set_milestone,
:set_label,
:write_project_snippet
]
end
......
......@@ -37,8 +37,9 @@
.clearfix
.error-alert
%hr
.form-group
%hr
- if can?(current_user, :set_assignee, @project)
.form-group
.issue-assignee
= f.label :assignee_id, class: 'control-label' do
%i.fa.fa-user
......@@ -49,7 +50,8 @@
selected: issuable.assignee_id, project: @target_project || @project)
&nbsp;
= link_to 'Assign to me', '#', class: 'btn assign-to-me-link'
.form-group
- if can?(current_user, :set_milestone, @project)
.form-group
.issue-milestone
= f.label :milestone_id, class: 'control-label' do
%i.fa.fa-clock-o
......@@ -64,7 +66,8 @@
&nbsp;
- if can? current_user, :admin_milestone, issuable.project
= link_to 'Create new milestone', new_namespace_project_milestone_path(issuable.project.namespace, issuable.project), target: :blank
.form-group
- if can?(current_user, :set_label, @project)
.form-group
= f.label :label_ids, class: 'control-label' do
%i.fa.fa-tag
Labels
......
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