This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse/lib
Martin Brennan 7c32411881
FEATURE: Secure media allowing duplicated uploads with category-level privacy and post-based access rules (#8664)
### General Changes and Duplication

* We now consider a post `with_secure_media?` if it is in a read-restricted category.
* When uploading we now set an upload's secure status straight away.
* When uploading if `SiteSetting.secure_media` is enabled, we do not check to see if the upload already exists using the `sha1` digest of the upload. The `sha1` column of the upload is filled with a `SecureRandom.hex(20)` value which is the same length as `Upload::SHA1_LENGTH`. The `original_sha1` column is filled with the _real_ sha1 digest of the file. 
* Whether an upload `should_be_secure?` is now determined by whether the `access_control_post` is `with_secure_media?` (if there is no access control post then we leave the secure status as is).
* When serializing the upload, we now cook the URL if the upload is secure. This is so it shows up correctly in the composer preview, because we set secure status on upload.

### Viewing Secure Media

* The secure-media-upload URL will take the post that the upload is attached to into account via `Guardian.can_see?` for access permissions
* If there is no `access_control_post` then we just deliver the media. This should be a rare occurrance and shouldn't cause issues as the `access_control_post` is set when `link_post_uploads` is called via `CookedPostProcessor`

### Removed

We no longer do any of these because we do not reuse uploads by sha1 if secure media is enabled.

* We no longer have a way to prevent cross-posting of a secure upload from a private context to a public context.
* We no longer have to set `secure: false` for uploads when uploading for a theme component.
2020-01-16 13:50:27 +10:00
..
concerns FIX: Post blurb incorrect when search contains a phrase match. 2019-03-26 17:01:52 +08:00
after-transition.js.es6 DEV: introduces prettier for es6 files 2018-06-15 17:03:24 +02:00
ajax-error.js.es6 FIX: Show error message if message exists 2019-05-09 22:12:51 +02:00
ajax.js.es6 FIX: IE11 compatibility for readonly check 2019-12-18 16:57:20 +00:00
autocomplete.js.es6 DEV: Move some autocomplete input styling to SCSS (#8381) 2019-11-20 12:32:00 -05:00
autosize.js.es6 DEV: introduces prettier for es6 files 2018-06-15 17:03:24 +02:00
cached-topic-list.js.es6 FEATURE: Add remembering topic list for group pms (#8235) 2019-10-24 09:27:03 -05:00
category-hashtags.js.es6 FIX: Do not autocomplete categories or emojis in code blocks (#8459) 2019-12-09 15:07:15 +02:00
category-tag-search.js.es6 REFACTOR: Remove debounce to discourseDebounce 2019-11-11 13:34:01 -05:00
clean-dom.js.es6 Revert "Revert Ember.run refactors" 2019-10-30 09:48:24 -04:00
click-track.js.es6 REFACTOR: isValidLink 2020-01-08 18:14:24 +01:00
computed.js.es6 DEV: Move computed to discourseComputed (#8312) 2019-11-07 15:38:28 -06:00
copy-text.js.es6 DEV: introduces prettier for es6 files 2018-06-15 17:03:24 +02:00
d-popover.js.es6 make eslint happy 2019-05-23 12:51:40 +02:00
debounce.js.es6 Revert "Revert Ember.run refactors" 2019-10-30 09:48:24 -04:00
decimal-adjust.js.es6 DEV: introduces prettier for es6 files 2018-06-15 17:03:24 +02:00
desktop-notifications.js.es6 DEV: Remove Discourse.User and import instead 2019-11-13 15:34:30 -05:00
dirty-keys.js.es6 DEV: introduces prettier for es6 files 2018-06-15 17:03:24 +02:00
discourse-location.js.es6 DEV: Import EmberObject rather than global variable (#8256) 2019-10-29 14:23:50 -05:00
export-csv.js.es6 FIX: better error message when forum is in read-only mode 2019-12-24 15:49:27 +05:30
export-result.js.es6 FEATURE: download user posts archive 2014-12-24 15:13:48 +05:30
eyeline.js.es6 DEV: Add test for load-more (#8369) 2019-11-25 14:42:34 +02:00
formatter.js.es6 DEV: Provide radix argument to parseInt (#8281) 2019-11-12 10:47:42 +01:00
hash.js.es6 DEV: introduces prettier for es6 files 2018-06-15 17:03:24 +02:00
highlight-syntax.js.es6 FEATURE: allow custom HighlightJS languages 2019-01-02 19:07:36 -05:00
highlight-text.js.es6 FIX: Letters between words incorrectly highlighted within post. 2019-04-03 15:57:51 +08:00
intercept-click.js.es6 FIX: an <a> with a target of _blank wants a new window 2019-02-19 14:44:30 -08:00
is-element-in-viewport.js.es6 DEV: introduces prettier for es6 files 2018-06-15 17:03:24 +02:00
key-value-store.js.es6 DEV: Provide radix argument to parseInt (#8281) 2019-11-12 10:47:42 +01:00
keyboard-shortcuts.js.es6 FEATURE: Keyboard shortcut for opening the topic admin menu (#8568) 2019-12-19 14:18:14 -05:00
lazy-load-images.js.es6 FIX: correctly account for onebox height when lazy loading images 2020-01-03 15:15:42 +11:00
lightbox.js.es6 DEV: Remove Discourse.User and import instead 2019-11-13 15:34:30 -05:00
link-category-hashtags.js.es6 Revert "Revert Ember.run refactors" 2019-10-30 09:48:24 -04:00
link-lookup.js.es6 DEV: introduces prettier for es6 files 2018-06-15 17:03:24 +02:00
link-mentions.js.es6 Revert "Revert Ember.run refactors" 2019-10-30 09:48:24 -04:00
link-tag-hashtag.js.es6 Revert "Revert Ember.run refactors" 2019-10-30 09:48:24 -04:00
load-script.js.es6 DEV: Import Promise from rsvp (#8296) 2019-11-05 10:37:32 -06:00
lock-on.js.es6 FIX: prevents multiple jumps to happen with LockOn (#8460) 2019-12-04 16:45:23 +01:00
logout.js.es6 FIX: Do not start the login flow when logging out from SSO/Authenticator (#8423) 2019-11-27 11:41:07 +00:00
mobile.js.es6 DEV: Import ember ENV instead of Ember.testing (#8305) 2019-11-07 11:20:35 -06:00
notification-levels.js.es6 DEV: introduces prettier for es6 files 2018-06-15 17:03:24 +02:00
offset-calculator.js.es6 DEV: introduces prettier for es6 files 2018-06-15 17:03:24 +02:00
optional-service.js.es6 DEV: introduces prettier for es6 files 2018-06-15 17:03:24 +02:00
page-tracker.js.es6 Revert "Revert Ember.run refactors" 2019-10-30 09:48:24 -04:00
page-visible.js.es6 DEV: unpin Prettier version, apply to YAML files 2019-01-17 13:05:39 -05:00
plugin-api.js.es6 FEATURE: allows plugins to add a global notice (#8552) 2019-12-27 09:06:36 +01:00
plugin-connectors.js.es6 DEV: Make it possible to deprecate plugin outlet properties 2019-11-20 13:56:26 +00:00
posts-with-placeholders.js.es6 DEV: Move computed to discourseComputed (#8312) 2019-11-07 15:38:28 -06:00
push-notifications.js.es6 Fix Prettier again 2019-11-15 10:52:06 -05:00
pwa-utils.js.es6 DEV: Import Promise from rsvp (#8296) 2019-11-05 10:37:32 -06:00
quote-state.js.es6 DEV: introduces prettier for es6 files 2018-06-15 17:03:24 +02:00
quote.js.es6 DEV: introduces prettier for es6 files 2018-06-15 17:03:24 +02:00
raw-templates.js.es6 DEV: introduces prettier for es6 files 2018-06-15 17:03:24 +02:00
register-topic-footer-button.js.es6 FIX: computed is part of @ember/object not @ember/object/computed 2019-11-13 11:58:09 -05:00
render-tag.js.es6 FEATURE: Tag synonyms 2019-12-04 13:33:51 -05:00
render-tags.js.es6 FEATURE: displays tags in search menu results when enabled (#7819) 2019-06-27 19:26:14 +02:00
render-topic-featured-link.js.es6 WIP - discourse/models/user not defined 2019-11-13 15:34:30 -05:00
reports-loader.js.es6 FIX: prevents race condition where the same report is loaded multiple times (#6953) 2019-01-25 19:29:45 +01:00
round.js.es6 FEATURE: 2 new reports: time to first response, topics with no response 2015-06-22 19:46:51 +02:00
safari-hacks.js.es6 FIX: Avoid unpinning composer on iOS when invoking emojis 2019-12-06 14:08:59 -05:00
screen-track.js.es6 DEV: Provide radix argument to parseInt (#8281) 2019-11-12 10:47:42 +01:00
search.js.es6 FEATURE: Allow scoping search to tag (#8345) 2019-11-14 10:40:26 +10:00
settings.js.es6 FIX: Show same username or name for post notices. (#7862) 2019-07-19 11:05:48 +03:00
sharing.js.es6 FEATURE: Make share button support custom javascript (#8090) 2019-09-12 11:19:43 -04:00
show-modal.js.es6 DEV: Import set, setProperties, helper, and string functions (#8297) 2019-11-05 12:43:49 -06:00
static-route-builder.js.es6 DEV: Import DiscourseRoute rather than Discourse.Route (#8225) 2019-10-22 09:46:10 -04:00
svg-sprite-loader.js.es6 Upgrade to FontAwesome 5 (take two) (#6673) 2018-11-26 16:49:57 -05:00
tag-hashtags.js.es6 DEV: introduces prettier for es6 files 2018-06-15 17:03:24 +02:00
text-direction.js.es6 DEV: introduces prettier for es6 files 2018-06-15 17:03:24 +02:00
text.js.es6 FIX: Respect enable_inline_emoji_translation setting in titles 2019-12-03 20:39:11 +01:00
theme-selector.js.es6 FIX: Ensure live-reloading of theme CSS works first time (#8052) 2019-08-29 15:47:08 +01:00
to-markdown.js.es6 FIX: keep 'rb' & 'rp' tags in html to markdown conversion. 2020-01-04 17:16:23 +05:30
tooltip.js.es6 FEATURE: unified popover implementation (#7244) 2019-03-26 15:43:27 +01:00
transform-post.js.es6 Improving bookmarks part 1 (#8466) 2019-12-11 14:04:02 +10:00
uploads.js.es6 FEATURE: Secure media allowing duplicated uploads with category-level privacy and post-based access rules (#8664) 2020-01-16 13:50:27 +10:00
url.js.es6 FIX: Make scrolling to bottom post in topic more consistent (#8671) 2020-01-08 16:37:13 +11:00
user-activation.js.es6 DEV: introduces prettier for es6 files 2018-06-15 17:03:24 +02:00
user-search.js.es6 REFACTOR: Remove debounce to discourseDebounce 2019-11-11 13:34:01 -05:00
utilities.js.es6 Revert "DEV: Log deprecated FA 4.7 icon names in /logs" 2019-12-18 12:44:52 -05:00
webauthn.js.es6 Check webauthn support when registering security keys (#8146) 2019-10-03 08:26:26 +10:00