Resolve LFS column Auditing for Group
Currently the auditing for LFS is being done using the column :lfs_enabled of Group model. But on Group Settings Page (Settings -> General -> Permissions and group features -> Allow projects within this group to use Git LFS) we show LFS enabled option by different logic. This causes discrepancy between the column being audited and the logic being used to show LFS enable/disable button on UI.
LFS enabled logic https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/models/group.rb#L332
def lfs_enabled?
return false unless Gitlab.config.lfs.enabled
return Gitlab.config.lfs.enabled if self[:lfs_enabled].nil?
self[:lfs_enabled]
end
This also prevents us from adding check for skipping auditing from blank to blank in https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/lib/audit/changes.rb
For more information refer this issue #358189 (closed)