Move Merge Request authorization checks to `EE` namespace
Right now, there are some checks in app/policies/merge_request_policy.rb specific to AI features, but AI features are Ultimate only. They should be moved to ee/app/policies/ee/merge_request_policy.rb
Code related to AI features:
rule { can?(:read_merge_request) }.policy do
enable :generate_diff_summary
end
rule { llm_bot }.policy do
enable :generate_diff_summary
end
There are also tests for this code in spec/policies/merge_request_policy_spec.rb that should be moved to ee/spec/policies/merge_request_policy_spec.rb
More about developing EE only features: https://docs.gitlab.com/ee/development/ee_features.html