From f9b5352a003b5e038724ad71218fe7579d83cd93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Gaya?= <sebastien.gaya@gmail.com> Date: Sun, 3 Jul 2022 14:52:52 +0200 Subject: [PATCH] ActiveStorage check abilities --- app/controllers/concerns/active_storage/check_abilities.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/controllers/concerns/active_storage/check_abilities.rb b/app/controllers/concerns/active_storage/check_abilities.rb index 508ceb4d4..bb1f96dce 100644 --- a/app/controllers/concerns/active_storage/check_abilities.rb +++ b/app/controllers/concerns/active_storage/check_abilities.rb @@ -4,8 +4,7 @@ module ActiveStorage::CheckAbilities private def check_abilities - # TEMP: Warning, we disable university check (TO REMOVE) - # render(file: Rails.root.join('public/403.html'), formats: [:html], status: 403, layout: false) and return if current_university.present? && @blob.university_id != current_university.id + render(file: Rails.root.join('public/403.html'), formats: [:html], status: 403, layout: false) and return if current_university.present? && @blob.university_id != current_university.id end def current_university -- GitLab