mirror of
https://github.com/discourse/discourse.git
synced 2025-02-20 11:48:26 -06:00
Work around deleted upload.access_control_post scoping issue
* TODO to come back and deal with this in a better way, it just needs to be done for the rake task to set secure media to work correctly
This commit is contained in:
parent
97d8f19387
commit
5dc6100acc
@ -60,6 +60,9 @@ class UploadSecurity
|
|||||||
# if there is no access control post id and the upload is currently secure, we
|
# if there is no access control post id and the upload is currently secure, we
|
||||||
# do not want to make it un-secure to avoid unintentionally exposing it
|
# do not want to make it un-secure to avoid unintentionally exposing it
|
||||||
def access_control_post_has_secure_media?
|
def access_control_post_has_secure_media?
|
||||||
|
# if the post is deleted the access_control_post will be blank...
|
||||||
|
# TODO: deal with this in a better way
|
||||||
|
return false if @upload.access_control_post.blank?
|
||||||
@upload.access_control_post.with_secure_media?
|
@upload.access_control_post.with_secure_media?
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user