Feature switch layer around Approvable and VisibleApprovable
CE port: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/24386
What does this MR do?
Extracted from https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/8769 as it is too big.
A feature called approval_rule
can be enabled anytime. After it is enabled, the new ApprovalState
class will be used to calculate approval status.
Compatibility layers are added around Approvable
and VisibleApprovable
to direct calls to ApprovalState
once the feature is enabled.
Some misc implementation around the final API MR is moved here as well, e.g. the private group masking class, and some utility query class.
For the following three files, the spec are EE specific, so moved under ee/
Its contents are unchanged apart from stubbing the feature flag.
- spec/services/notification_service_spec.rb
- spec/services/merge_requests/update_service_spec.rb
- spec/models/merge_request_spec.rb
What are the relevant issue numbers?
https://gitlab.com/gitlab-org/gitlab-ee/issues/8789
Does this MR meet the acceptance criteria?
-
Tests added for this feature/bug -
Tested in all supported browsers -
Conforms to the code review guidelines -
Conforms to the merge request performance guidelines -
Conforms to the style guides -
Conforms to the database guides -
Link to e2e tests MR added if this MR has Requires e2e tests label. See the Test Planning Process. -
EE specific content should be in the top level /ee
folder -
For a paid feature, have we considered GitLab.com plans, how it works for groups, and is there a design for promoting it to users who aren't on the correct plan?