Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Returns not_found if the user isn't logged in and there isn't a board #130

Merged
merged 1 commit into from
Oct 27, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions app/controllers/board_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ def index
end

failure :no_board do
return not_found unless logged_in?
redirect_to "/#{params[:user]}/#{params[:repo]}/board/create"
end

Expand All @@ -22,7 +23,7 @@ def index
end

def create_board
not_found unless logged_in?
return not_found unless logged_in?
@parameters = params
@repo = gh.repos(params[:user],params[:repo])

Expand All @@ -43,7 +44,7 @@ def create
end

def enable_issues?
not_found unless logged_in?
return not_found unless logged_in?
@parameters = params
@repo = gh.repos(params[:user],params[:repo])
render :enable_issues
Expand Down
2 changes: 1 addition & 1 deletion app/views/board/create_board.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="instructions drop-shadow">
<h2> We noticed your repository issue tracker is not yet configured for HuBoard</h2>
<% if @repo['permissions'] && @repo['permissions']['push'] %>
<% if @repo && @repo['permissions'] && @repo['permissions']['push'] %>
<p> No worries, HuBoard can automatically get you started with a default label configuration </p>
<p> HuBoard will create the following labels </p>
<ol start="0">
Expand Down