1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-03-31 19:45:45 +00:00

Added is_public to a tournament to hide lineups and brackets until you're ready to make it public

This commit is contained in:
2023-01-01 23:16:12 -05:00
parent d675337d7a
commit c328bbd91c
15 changed files with 547 additions and 16 deletions

View File

@@ -2,7 +2,7 @@ class SchoolsController < ApplicationController
before_action :set_school, only: [:import_baumspage_roster, :show, :edit, :update, :destroy, :stats]
before_action :check_access_director, only: [:new,:create,:destroy]
before_action :check_access_delegate, only: [:import_baumspage_roster, :update,:edit]
before_action :check_read_access, only: [:show]
def stats
@tournament = @school.tournament
@@ -108,5 +108,9 @@ class SchoolsController < ApplicationController
def check_access_delegate
authorize! :manage, @school
end
def check_read_access
authorize! :read, @school
end
end