1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-03-25 01:14:43 +00:00

Added logic to delegate tournament access

This commit is contained in:
2016-01-06 18:38:02 +00:00
parent eb9037b078
commit f46029efaf
46 changed files with 417 additions and 121 deletions

View File

@@ -84,9 +84,7 @@ class SchoolsController < ApplicationController
elsif @school
@tournament = @school.tournament
end
if current_user != @tournament.user
redirect_to '/static_pages/not_allowed'
end
authorize! :manage, @tournament
end
end