Skip to content

Commit f1a5b8e

Browse files
committed
allow not required document annexes to be downloaded
1 parent 0d44d1b commit f1a5b8e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/models/operator_document.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,8 @@ def publication_authorization?
142142
# # TODO: I would name it public? but we have public attribute that should be refactored at some point
143143
def needs_authorization_before_downloading?
144144
return true if publication_authorization?
145-
return false if (doc_valid? || doc_expired?) && (operator.publication_authorization_signed? || public?)
145+
# doc_not_required? is included as that document could have annexes and those should be downloadable without authorization
146+
return false if (doc_valid? || doc_expired? || doc_not_required?) && (operator.publication_authorization_signed? || public?)
146147

147148
true
148149
end

0 commit comments

Comments
 (0)