diff options
author | Sophie Herold <sophie@hemio.de> | 2017-03-30 10:39:02 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-12-11 20:38:53 +0100 |
commit | 7ccd6a51a529452cdbd1d39121b067b773fcb170 (patch) | |
tree | 3fff27460dd22d90e011d73f0f1efa233cd6273d /app/helpers | |
parent | 39d6cc1f59a44b28275986b436ad561bf7bf8ee5 (diff) | |
download | gitlab-ce-7ccd6a51a529452cdbd1d39121b067b773fcb170.tar.gz |
Hide issues and MRs in labels list if disabledsophie-h/gitlab-ce-patch-15
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/labels_helper.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/helpers/labels_helper.rb b/app/helpers/labels_helper.rb index e1ba7898ee6..c1c19062c91 100644 --- a/app/helpers/labels_helper.rb +++ b/app/helpers/labels_helper.rb @@ -1,6 +1,13 @@ module LabelsHelper include ActionView::Helpers::TagHelper + def show_label_issuables_link?(label, issuables_type, current_user: nil, project: nil) + return true if label.is_a?(GroupLabel) + return true unless project + + project.feature_available?(issuables_type, current_user) + end + # Link to a Label # # label - Label object to link to |