diff options
Diffstat (limited to 'app/helpers/labels_helper.rb')
-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 |