mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-04-03 05:27:25 +00:00
Added logic to delegate tournament access
This commit is contained in:
@@ -99,8 +99,6 @@ class WrestlersController < ApplicationController
|
||||
elsif @wrestler
|
||||
@tournament = @wrestler.tournament
|
||||
end
|
||||
if current_user != @tournament.user
|
||||
redirect_to '/static_pages/not_allowed'
|
||||
end
|
||||
authorize! :manage, @tournament
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user