Commit ea6d9bbc authored by André Luís's avatar André Luís Committed by Mario de la Ossa

Use project-level license check for Batch Comments

Instead of using instance-level. Prevents projects
in GitLab.com that don't have EEP level from showing
the EEP feature.
parent 235c3fdc
...@@ -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