diff options
author | Patricio Cano <suprnova32@gmail.com> | 2016-09-02 02:49:48 +0300 |
---|---|---|
committer | Patricio Cano <suprnova32@gmail.com> | 2016-09-15 20:27:32 +0300 |
commit | fd621429508ba3877e27a8187f0d491576b65ad0 (patch) | |
tree | 827492a8a13dff86ae72705419b2d4045f543598 /app/models/group.rb | |
parent | f8bd9625f44ae4233c14e473c57becfb7ff15ca9 (diff) |
Added group-specific setting for LFS.
Groups can enable/disable LFS, but this setting can be overridden at the project level. Admin only
Diffstat (limited to 'app/models/group.rb')
-rw-r--r-- | app/models/group.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/models/group.rb b/app/models/group.rb index c48869ae465..aefb94b2ada 100644 --- a/app/models/group.rb +++ b/app/models/group.rb @@ -95,6 +95,13 @@ class Group < Namespace end end + def lfs_enabled? + return false unless Gitlab.config.lfs.enabled + return Gitlab.config.lfs.enabled if self[:lfs_enabled].nil? + + self[:lfs_enabled] + end + def add_users(user_ids, access_level, current_user: nil, expires_at: nil) user_ids.each do |user_id| Member.add_user( |