mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-19 01:26:08 +10:00
Merge branch 'snippets-page' into 'master'
Render 404 instead of 500 if trying to see snippets of unexisting user Fixes #1087
This commit is contained in:
@@ -19,6 +19,9 @@ class SnippetsController < ApplicationController
|
||||
|
||||
def user_index
|
||||
@user = User.find_by(username: params[:username])
|
||||
|
||||
render_404 and return unless @user
|
||||
|
||||
@snippets = @user.snippets.fresh.non_expired
|
||||
|
||||
if @user == current_user
|
||||
|
||||
Reference in New Issue
Block a user