Skip to content

Commit

Permalink
prevent a user to edit someone else's talk
Browse files Browse the repository at this point in the history
the bug was introduced by b8f2db2
and caused by the unnecessary complexity of the test,
which has nested unless with complicated conditions

this patch only fixes the bug, not the unnecessary complexity of the test
  • Loading branch information
book committed Jul 27, 2013
1 parent 2ed7efa commit e9c5257
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Act/Handler/Talk/Edit.pm
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ sub handler {
unless ($Request{user}->is_talks_admin) {
unless ( ($talk && $talk->user_id == $Request{user}->user_id
&& ($Config->talks_edition_open || $Config->talks_submissions_open))
|| $Config->talks_submissions_open )
|| (!$talk && $Config->talks_submissions_open ))
{
$Request{status} = NOT_FOUND;
return;
Expand Down

0 comments on commit e9c5257

Please sign in to comment.