diff options
author | Phil Hughes <me@iamphill.com> | 2016-10-21 12:14:14 +0100 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2016-11-01 08:35:23 +0000 |
commit | b5decb21813e23d7a6828f6aa70bac909b6ce09f (patch) | |
tree | 9702b39fd6cd2ca35e9ec5a2412847cf277b6f11 /app/helpers/events_helper.rb | |
parent | b328c7885532ccff70e1f9f7dc970a8dde0c52d6 (diff) | |
download | gitlab-ce-b5decb21813e23d7a6828f6aa70bac909b6ce09f.tar.gz |
Hide project activity tabs when features are disabled
Diffstat (limited to 'app/helpers/events_helper.rb')
-rw-r--r-- | app/helpers/events_helper.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/helpers/events_helper.rb b/app/helpers/events_helper.rb index f8ded05c31a..dba380974c6 100644 --- a/app/helpers/events_helper.rb +++ b/app/helpers/events_helper.rb @@ -39,6 +39,12 @@ module EventsHelper end end + def event_filter_visible(key) + return true unless @project + + return @project.feature_available?(:repository, current_user) + end + def event_preposition(event) if event.push? || event.commented? || event.target "at" |