Can't access a folder under watch, but works again when unwatching the folder #1469

This commit is contained in:
Karel Pičman 2023-08-23 09:10:18 +02:00
parent 6b940757cc
commit 4120744315

View File

@ -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