Skip to content
This repository was archived by the owner on Apr 15, 2023. It is now read-only.
This repository was archived by the owner on Apr 15, 2023. It is now read-only.

404 error for not authorized user #35

@nashby

Description

@nashby
Given not authorized user
Given open contest
When I visit http://codebrawl.com/contests/command-line-todo-lists/entries/new
I should not see 404 error

I think it's because of this line (entries_controller.rb):

@contest.not_found if @contest.has_entry_from?(current_user)

so if current_user == nil this method fails (contest.rb):

def has_entry_from?(user)
  entries.where(:user_id => user.id).any?
end

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions