diff options
author | Phil Hughes <me@iamphill.com> | 2017-06-30 12:31:41 +0100 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2017-06-30 12:37:35 +0100 |
commit | 531a4d124b0a17280b4118d7fa7c66f11042917b (patch) | |
tree | a2ee668d403ed538d6046f942f31bce2c1224563 /app/models/project_feature.rb | |
parent | f5681fb55a762c9b9bb35c80bf87d727d8d8fd06 (diff) | |
parent | 81dba76b9d7d120cd22e3619a4058bd4885be9bc (diff) | |
download | gitlab-ce-experimental-breadcrumbs.tar.gz |
Merge branch 'master' into experimental-breadcrumbsexperimental-breadcrumbs
Diffstat (limited to 'app/models/project_feature.rb')
-rw-r--r-- | app/models/project_feature.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/app/models/project_feature.rb b/app/models/project_feature.rb index 48edd0738ee..c8fabb16dc1 100644 --- a/app/models/project_feature.rb +++ b/app/models/project_feature.rb @@ -51,8 +51,11 @@ class ProjectFeature < ActiveRecord::Base default_value_for :repository_access_level, value: ENABLED, allows_nil: false def feature_available?(feature, user) - access_level = public_send(ProjectFeature.access_level_attribute(feature)) - get_permission(user, access_level) + get_permission(user, access_level(feature)) + end + + def access_level(feature) + public_send(ProjectFeature.access_level_attribute(feature)) end def builds_enabled? |