My Profile Photo

Sheogorath's Blog


Depending on the time of the day a friend, a colleague, a wise guy. The beauty of the world is its sense of humor to show humans their way by letting them search their own.


Cover image for this blog post

GitLab console mass feature disabling

Today I learned how to mass-disable unused/unwanted project features instance wide using the gitlab-rails console command. In my specific case, I wanted to disable the useless “Security & Compliance” section, that is nothing more than an up-selling page in every project. Using the command below, I was able to disable this feature in all existing projects.

Project.all.each do |p|
  p.update_attribute("security_and_compliance_enabled".to_sym, false)
end

I came across this while revisiting some automatically created repositories on SI-GitLab. This helped to get rid of a lot of annoyance. However a question that still remains open is whether it’s is possible to adjust the default enabled project features and if so, how to do that.