summaryrefslogtreecommitdiff
path: root/lib/gitlab/access.rb
diff options
context:
space:
mode:
authormicael.bergeron <micael.bergeron@solutionstlm.com>2017-07-29 11:04:42 -0400
committermicael.bergeron <micael.bergeron@solutionstlm.com>2017-09-06 09:00:57 -0400
commit966b1128d884a318dad4277e23368334fe67e836 (patch)
treec0007ce9697dfe0fe93b52e619e21e8341c35120 /lib/gitlab/access.rb
parent8fe1aa5dbbb41cdefffb7177d9eda44ac8652cc7 (diff)
downloadgitlab-ce-966b1128d884a318dad4277e23368334fe67e836.tar.gz
WIP: refactor the first-contributor to Issuable
this will remove the need make N queries (per-note) at the cost of having to mark notes with an attribute this opens up the possibility for other special roles for notes
Diffstat (limited to 'lib/gitlab/access.rb')
-rw-r--r--lib/gitlab/access.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/gitlab/access.rb b/lib/gitlab/access.rb
index 4714ab18cc1..b4012ebbb99 100644
--- a/lib/gitlab/access.rb
+++ b/lib/gitlab/access.rb
@@ -67,10 +67,14 @@ module Gitlab
def protection_values
protection_options.values
end
+
+ def human_access(access)
+ options_with_owner.key(access)
+ end
end
def human_access
- Gitlab::Access.options_with_owner.key(access_field)
+ Gitlab::Access.human_access(access_field)
end
def owner?