diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-03-09 12:02:17 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-03-09 12:02:17 +0300 |
commit | bc14d81af02f2b433692edbfc93db6fc7a31fa67 (patch) | |
tree | 16fdf914e3c8b93671986bf31bd9dea0f9a001a6 /app/finders | |
parent | c674ffe0e045e46fd0f2754b77b1042444d95388 (diff) | |
parent | 836d5930332797192094ce4a3c8083e96f7e8c53 (diff) |
Merge branch 'rs-snippets-dont-expire' into 'master'
Remove `Snippet#expires_at`
This was removed from the interface in
https://github.com/gitlabhq/gitlabhq/pull/6027 but its implementation
lingered around for two years.
See merge request !3103
Diffstat (limited to 'app/finders')
-rw-r--r-- | app/finders/snippets_finder.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/finders/snippets_finder.rb b/app/finders/snippets_finder.rb index 07b5759443b..a41172816b8 100644 --- a/app/finders/snippets_finder.rb +++ b/app/finders/snippets_finder.rb @@ -4,7 +4,7 @@ class SnippetsFinder case filter when :all then - snippets(current_user).fresh.non_expired + snippets(current_user).fresh when :by_user then by_user(current_user, params[:user], params[:scope]) when :by_project @@ -27,7 +27,7 @@ class SnippetsFinder end def by_user(current_user, user, scope) - snippets = user.snippets.fresh.non_expired + snippets = user.snippets.fresh return snippets.are_public unless current_user @@ -48,7 +48,7 @@ class SnippetsFinder end def by_project(current_user, project) - snippets = project.snippets.fresh.non_expired + snippets = project.snippets.fresh if current_user if project.team.member?(current_user.id) |