From 4120744315468d06c5a4c3185eb47773e910c2c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Pi=C4=8Dman?= Date: Wed, 23 Aug 2023 09:10:18 +0200 Subject: [PATCH] Can't access a folder under watch, but works again when unwatching the folder #1469 --- app/models/dmsf_folder.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/dmsf_folder.rb b/app/models/dmsf_folder.rb index 3154baf3..9c55befc 100644 --- a/app/models/dmsf_folder.rb +++ b/app/models/dmsf_folder.rb @@ -101,7 +101,7 @@ class DmsfFolder < ApplicationRecord before_create :default_values - def visible? + def visible?(_user = User.current) return DmsfFolder.visible.exists?(id: id) if respond_to?(:type) && /^folder/.match?(type) true