Correct database columns (like projects.service_desk_enabled) when licenses change
The following discussion from !2109 (merged) should be addressed:
-
@DouweM started a discussion: (+2 comments) I'm not sure if we should do this. The idea is that GitLab.com users and groups, as well as GitLab EE instances, can switch between different plans without interruption.
Since we only show the
service_desk_enabled
checkbox whenEE::Gitlab::ServiceDesk.enabled?(project: self)
, it seems like there would be no way to recover from this failure.I think we should just disable the feature if the plan/license doesn't have it, without trying to be nice to the user about it, at least for now. If you're on Silver and you downgrade to Bronze or no plan at all, you know that service desk is going to be disabled.
Whenever a namespace or instance license changes, we should flip any bits that need to be flipped in the database.
We know this is necessary for the service desk; do we need any other state to be changed?
Let's keep a list here:
-
projects.service_desk_enabled
!2109 (merged) -
merge_requests.squash
!2249 (merged) -
projects.merge_requests_rebase_enabled
!2200 (merged) -
projects.merge_requests_ff_only_enabled
!2272 (merged) -
remote_mirrors
https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/2328#note_34255648