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
end
def draft_notes_available?
@project.feature_available?(:batch_comments) &&
::Feature.enabled?(:batch_comments, current_user, default_enabled: false)
@project.feature_available?(:batch_comments, current_user)
end
def authorize_admin_draft!
......
module BatchCommentsHelper
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
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