mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-03-25 01:14:43 +00:00
Finished setting owner for tournamenr and protecting paths
This commit is contained in:
@@ -1,2 +1,14 @@
|
||||
module ApplicationHelper
|
||||
def tournament_permissions(tournament)
|
||||
if user_signed_in?
|
||||
if tournament.user == current_user
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
else
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user