Commit fea9b6aa authored by Robert Speicher's avatar Robert Speicher

Merge branch 'batch-comments-per-project-license-check' into 'master'

Use project-level license check for Batch Comments

See merge request gitlab-org/gitlab-ee!7838
parents 0762855b ea6d9bbc
...@@ -107,8 +107,7 @@ class Projects::MergeRequests::DraftsController < Projects::MergeRequests::Appli ...@@ -107,8 +107,7 @@ class Projects::MergeRequests::DraftsController < Projects::MergeRequests::Appli
end end
def draft_notes_available? def draft_notes_available?
@project.feature_available?(:batch_comments) && @project.feature_available?(:batch_comments, current_user)
::Feature.enabled?(:batch_comments, current_user, default_enabled: false)
end end
def authorize_admin_draft! def authorize_admin_draft!
......
module BatchCommentsHelper module BatchCommentsHelper
def batch_comments_enabled? def batch_comments_enabled?
current_user.present? && License.feature_available?(:batch_comments) && Feature.enabled?(:batch_comments, current_user, default_enabled: false) current_user.present? && @project.feature_available?(:batch_comments, current_user)
end end
end end
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