Commit Graph

10912 Commits

Author SHA1 Message Date
Osama Sayegh
6515ff19e5
FEATURE: Allow customization of robots.txt (#7884)
* FEATURE: Allow customization of robots.txt

This allows admins to customize/override the content of the robots.txt
file at /admin/customize/robots. That page is not linked to anywhere in
the UI -- admins have to manually type the URL to access that page.

* use Ember.computed.not

* Jeff feedback

* Feedback

* Remove unused import
2019-07-15 20:47:44 +03:00
Penar Musaraj
90e0f1b378 UX: rearrange controls in edit modals
Allows users to see the controls even after scrolling contents of edit modal.
2019-07-15 13:44:44 -04:00
Rafael dos Santos Silva
1221d34284
FEATURE: Make Discourse work offline with WorkboxJS (#7870) 2019-07-15 13:05:55 -03:00
Vinoth Kannan
839916aa49
DEV: Debundle plugin javascript assets and don't load if disabled (#7566)
And don't load javascript assets if plugin is disabled.

* precompile auto generated plugin js assets

* SPEC: remove spec test functions

* remove plugin js from test_helper

Co-Authored-By: Régis Hanol <regis@hanol.fr>

* DEV: using equality is slightly easier to read than inequality

Co-Authored-By: Régis Hanol <regis@hanol.fr>

* DEV: use `select` method instead of `find_all` for readability

Co-Authored-By: Régis Hanol <regis@hanol.fr>
2019-07-15 20:22:54 +05:30
Guo Xiang Tan
4b0cf7f6dd SECURITY: XSS when displaying watched words in admin panel.
The XSS here is only possible if CSP is disabled. Low impact since CSP
is enabled by default in SiteSettings.
2019-07-15 10:55:50 +08:00
Bianca Nenciu
c4d1833588 FIX: Do not show bootbox if post has no replies. (#7866)
When we delete a post that has replies, we show a modal asking if the user wants to delete the post, the post and its direct replies or the post and all its replies.

If replies are deleted before a post, that modal would ask the user if they want to delete the post and 0 replies.

That commit ensure we skip the modal and directly delete the post in this case.
2019-07-12 11:42:57 +02:00
Gerhard Schlager
4a095b286b Follow-up for 9a11a8b3 to fix qunit tests 2019-07-11 23:56:22 +02:00
Gerhard Schlager
9a11a8b33b FEATURE: Site setting for typographic quotation marks
Adds locale defaults for German and French
2019-07-11 23:19:28 +02:00
Arpit Jalan
e0562a8172 UX: update placeholder for Tags Groups 2019-07-11 12:34:11 +05:30
Kris
aa7181820c UX: Add title attribute and aria-label to PM icon link 2019-07-10 23:05:57 -04:00
Kris
bdaf07adcf Hide empty anchor tag from screen readers 2019-07-10 22:39:25 -04:00
Kris
1983f0d06e Don't load PM icon in title unless topic is a PM 2019-07-10 22:38:32 -04:00
Kris
b848bd4ddc True should be a string to display properly in aria-haspopup 2019-07-10 22:02:21 -04:00
Joffrey JAFFEUX
bd35a8f334
FIX: ensures spinner is showing on tags/show when loading more (#7876)
Context: https://meta.discourse.org/t/issue-while-scrolling-down-after-selecting-a-tag-on-the-home-page/122542
2019-07-10 21:37:31 +02:00
Joffrey JAFFEUX
142344e45d
FIX: ensures routing with hash doesn't stuck history (#7872)
* FIX: ensures routin with hash doesnt stuck history

Original issue: https://meta.discourse.org/t/hash-anchor-in-url-prevents-further-url-updates/122068/4

Basically when the path has a hash, state would be null, and nothing would happen.

* Update app/assets/javascripts/discourse/lib/discourse-location.js.es6

Co-Authored-By: Régis Hanol <regis@hanol.fr>
2019-07-10 20:43:03 +02:00
romanrizzi
f89bd55576 Revert "FEATURE: admin/user exports are compressed using the zip format (#7784)"
This reverts commit 8b2580e20f.
2019-07-10 11:38:51 -03:00
Dan Ungureanu
90fcdad3cd UX: Discard selected post if it is not in viewport. (#7869)
This way, users can combine keyboard shortcuts with mouse scrolling.
2019-07-10 10:22:09 -04:00
Roman Rizzi
8b2580e20f
FEATURE: admin/user exports are compressed using the zip format (#7784)
* FEATURE: admin/user exports are compressed using the zip format

* Update translations. Theme exporter now exports .zip file. Theme importer supports .zip and .gz files

* Fix controller test, updated locale and skip saving the csv export to disk
2019-07-10 11:13:03 -03:00
Robin Ward
629bb8adf2 SECURITY: XSS with title selector on preferences page
Note this is very low severity as the group needs to be created with a
default title that contains HTML, and group creation is restricted to
staff members right now.
2019-07-09 15:49:24 -04:00
Dan Ungureanu
9f5cfa192e
FEATURE: Allow Markdown in post notices. (#7864) 2019-07-09 14:42:02 +03:00
Penar Musaraj
f4dc6de9f1 FIX: Clear theme editor content on switching tabs
Issue happens when sending a null value to ACE Editor.
Fixed by sending an empty string to ACE instead of null.
2019-07-08 20:06:56 -04:00
Penar Musaraj
7b0517895e FEATURE: Add "Group owners" to posting options for groups
Context: https://meta.discourse.org/t/121589

This new setting option lets group owners message/mention large groups
without granting that privilege to all members.
2019-07-08 17:14:11 -04:00
Penar Musaraj
b690fc3d98
FEATURE: Add new group visibility option for "logged on users" (#7814)
Groups can now be marked as visible to "logged on users". All automatic groups (except `everyone`) are now visible to "logged on users", previously they were marked as public but suppressed in the group page for non-staff.
2019-07-08 15:09:50 -04:00
Robin Ward
de6edf9e4e FIX: Back button would go to previous topic instead of list
See related topic:
https://meta.discourse.org/t/back-button-history-not-properly-working/122183

The issue here is the transition was not completing properly which meant
if you backed out of a topic quickly and entered a new one, hitting back
in the second topic would sometimes take you to the previous one instead
of back to the topic list.
2019-07-05 15:53:14 -04:00
Arpit Jalan
bd084b2147 FIX: do not show invite button if local logins are disabled 2019-07-05 15:16:20 +05:30
Joffrey JAFFEUX
f140c4d499
FIX: ensures routing to / with query string works (#7859) 2019-07-05 09:40:19 +02:00
Vinoth Kannan
1bb258ab49 DEV: use upload short-url in html to markdown conversion if 'base62-sha1' data attr available. 2019-07-05 10:06:41 +05:30
Penar Musaraj
c78634284c UI: when in a different topic context, allow dismissing draft without destroying it
This changes the label and behaviour of the "No, keep" button in the confirmation modal when user cancels a draft while on a different topic. The new button label is "No, save draft", and when clicked, the composer will be dismissed without destroying the draft.
2019-07-04 11:45:57 -04:00
Mario Santos
c5625b70f1 FIX: Prevent emoji-picker from not showing (#7856)
If an external plugin inserts an element with class "emoji-picker", something probable if they extend EmojiPicker, it could cause troubles as css is added depending on the emoji-picker height. Just by adding a class of a parent <div> as could be d-editor, we prevent this from happening.
2019-07-04 11:46:21 +02:00
Gerhard Schlager
a5e80079d6 FEATURE: Add Belarusian language 2019-07-04 11:37:37 +02:00
Joffrey JAFFEUX
71bf9ec1b2
FEATURE: opt-in guidance on topics for users without access (#7852)
Co-Authored-By: majakomel <maja.komel@gmail.com>
Co-Authored-By: Robin Ward <robin.ward@gmail.com>
2019-07-04 10:12:39 +02:00
David Taylor
5fdf228db6
FIX: Respect the full_screen_login parameter from plugin auth providers (#7855)
This behavior was regressed in 427979e7e5
2019-07-04 09:06:29 +01:00
Bianca Nenciu
459932f4e2 FIX: Use title attribute for notification items. (#7840) 2019-07-03 10:48:13 -04:00
romanrizzi
9ca1bbe900 Revert "FIX: remove misplaced save button"
This reverts commit 4f468ef210.
2019-07-03 10:56:08 -03:00
Joffrey JAFFEUX
f9f1df7611
DEV: prevents reports key to be time dependant when testing (#7850) 2019-07-03 15:43:01 +02:00
romanrizzi
4f468ef210 FIX: remove misplaced save button 2019-07-03 10:39:01 -03:00
Bianca Nenciu
bfdf740a05 FIX: Show 'Export' button for all tabular reports. (#7838) 2019-07-03 14:47:36 +02:00
Osama Sayegh
3d64532273 FEATURE: allow disabling theme components (#7812)
This allows you to temporarily disable components without having to remove them from a theme. 

This feature is very handy when doing quick fix engineering.
2019-07-03 18:18:11 +10:00
Joffrey JAFFEUX
ecf0215ee7
DEV: resets page tracking state between tests (#7847) 2019-07-03 10:08:05 +02:00
Joffrey JAFFEUX
0733ed3a2b
FIX: ensures /t/TOPIC_ID/POST_NUMBER is correctly routing (#7841) 2019-07-03 09:23:23 +02:00
Penar Musaraj
6e3e0685fb DEV: add useBlockMode option for toolbar button text selection
Allows buttons to switch selection to block mode if needed.
2019-07-02 18:02:40 -04:00
Rafael dos Santos Silva
c422520b4a FEATURE: Add CSS classes to associated accounts rows 2019-07-02 16:56:15 -03:00
Joffrey JAFFEUX
72441e2c7c
FIX: page starts at 1 (#7844) 2019-07-02 17:26:23 +02:00
romanrizzi
8404921b91 FIX: Remove misplaced outlet 2019-07-02 11:26:40 -03:00
Arpit Jalan
ccb3ba509d
FIX: creating new badge is failing on empty SQL query (#7837) 2019-07-02 15:12:53 +05:30
Penar Musaraj
fca2f0f212 FIX: Only show remove timer button to users with permission to do so 2019-07-01 22:17:02 -04:00
Osama Sayegh
f1c67729de Different fix (#7815) 2019-07-02 11:53:16 +10:00
Sam Saffron
4dcc5f16f1 FEATURE: when under extreme load disable search
The global setting disable_search_queue_threshold
(DISCOURSE_DISABLE_SEARCH_QUEUE_THRESHOLD) which default to 1 second was
added.

This protection ensures that when the application is unable to keep up with
requests it will simply turn off search till it is not backed up.

To disable this protection set this to 0.
2019-07-02 11:22:01 +10:00
Arpit Jalan
f56d86a852 FIX: use normal title instead of fancy title for prefilled composer 2019-07-01 17:55:24 +05:30
Joffrey JAFFEUX
7b52a110b8
DEV: removes DOMTokenList polyfill (#7831)
Creates more issues than it solves especially on IOS, I dont trust it anymore. Will reconsider if this is an issue in the future.
2019-07-01 14:08:38 +02:00
Arpit Jalan
997250586c FEATURE: prefill title for direct messages from topic
https://meta.discourse.org/t/default-re-title-title-for-direct-messages-from-topic/121413
2019-07-01 17:14:08 +05:30
Joffrey JAFFEUX
af58049eeb
UX: puts tags and categories on same line in search-menu-results (#7830) 2019-07-01 13:11:43 +02:00
Joffrey JAFFEUX
384f5cea05
FIX: ensures static pages are using absolute path (#7828) 2019-07-01 11:25:45 +02:00
Joffrey JAFFEUX
11ae5c78db
FEATURE: adds infite scroll on admin users list page (#7821) 2019-07-01 11:00:06 +02:00
Bianca Nenciu
4f97f85178 DEV: Fix lint. (#7824) 2019-06-28 20:24:09 +02:00
Joffrey JAFFEUX
5bab4f8007
UX: gives each info its own line in search-menu-results (#7825) 2019-06-28 11:14:38 +02:00
Joffrey JAFFEUX
61438c825a
fix prettier (#7823) 2019-06-28 09:36:38 +02:00
Bianca Nenciu
b2eb0f4ad6 FEATURE: Export any type of report supporting table mode. (#7662) 2019-06-28 08:50:31 +02:00
Kris
82f2af8a0d UX: Move link to show tracked topics, simplify translation 2019-06-27 21:36:24 -04:00
Ralph Rooding
4ba35472e6 Don't check for second factor when switching to anonymous account (#7803) 2019-06-27 15:01:26 -07:00
Joffrey JAFFEUX
a61147d838
FEATURE: displays tags in search menu results when enabled (#7819) 2019-06-27 19:26:14 +02:00
Robin Ward
ed936bcb01 FIX: Fix a navigation bug
To reproduce:

1. Visit a url in a new tab such as `/latest?order=views`

2. Click a topic link

3. Click the back button

Before this patch, you would not be sent back to the latest list.

Now, I am somewhat hesitant to delete code like this, but the [original
commit](b2b7f4d905)
explains a situation that I cannot reproduce with the code missing.

I cannot seem to keep the filters as sticky even if I try. At the very
least this is better to commit right now than the currently known broken
situation.
2019-06-27 09:06:10 -04:00
Sam Saffron
5bc5c02af6 FIX: mark topics in sub categories as unread when dismissing parent
Previously we would only dismiss the parent category and leave the
child categories unread
2019-06-27 13:26:48 +10:00
Jeff Wong
88ef5e55fe
FEATURE: add ability to have multiple totp factors (#7626)
Adds a second factor landing page that centralizes a user's second factor configuration.

This contains both TOTP and Backup, and also allows multiple TOTP tokens to be registered and organized by a name. Access to this page is authenticated via password, and cached for 30 minutes via a secure session.
2019-06-26 16:58:06 -07:00
Joffrey JAFFEUX
c63268467e
DEV: prettier 1.18.2 (#7810) 2019-06-26 17:09:52 +02:00
Penar Musaraj
76307611dc
UX: new inline button to remove a topic timer (#7790) 2019-06-26 11:08:53 -04:00
Gerhard Schlager
13f38055ac SECURITY: XSS in routes
Co-authored-by: Guo Xiang Tan <tgx_world@hotmail.com>
Co-authored-by: David Taylor <david@taylorhq.com>
2019-06-26 16:34:15 +02:00
Joffrey JAFFEUX
56b76f31dc
fix prettier linting (#7809) 2019-06-26 15:26:02 +02:00
Daniel Waterworth
65a6e2c860 Change Widget#attach signature
Take a fallback option instead of a list of names
2019-06-26 09:01:25 -04:00
Daniel Waterworth
37b8f5d989 Use dasherize instead of replace 2019-06-26 09:01:25 -04:00
Daniel Waterworth
d025e188e8 Make the linter happy 2019-06-26 09:01:25 -04:00
Daniel Waterworth
70e27641eb Pass data to description to prevent duplication 2019-06-26 09:01:25 -04:00
Daniel Waterworth
8c349101c5 Pass data to text method to prevent duplication 2019-06-26 09:01:25 -04:00
Daniel Waterworth
86d5208b31 Pass data to url method to avoid duplication 2019-06-26 09:01:25 -04:00
Daniel Waterworth
ac6f7b3625 Remove notificationType argument from text 2019-06-26 09:01:25 -04:00
Daniel Waterworth
a3254b8446 Pull invitee accepted notification behaviour into its own class 2019-06-26 09:01:25 -04:00
Daniel Waterworth
7c52ba1431 Pull liked consolidated notification behaviour into its own class 2019-06-26 09:01:25 -04:00
Daniel Waterworth
42143a874e Pull custom notification behaviour into its own class 2019-06-26 09:01:25 -04:00
Daniel Waterworth
305562bf66 Pull title logic into its own method 2019-06-26 09:01:25 -04:00
Daniel Waterworth
d83147d137 Rename "title" variable to more apt "description" 2019-06-26 09:01:25 -04:00
Daniel Waterworth
02deaa4bc6 Pull icon choosing into its own method 2019-06-26 09:01:25 -04:00
Daniel Waterworth
36d7abed0b Pull group message summary behaviour into its own class 2019-06-26 09:01:25 -04:00
Daniel Waterworth
396e13aaa7 Pull liked notification behaviour in its own class 2019-06-26 09:01:25 -04:00
Daniel Waterworth
bd062fcbef Export DefaultNotificationItem 2019-06-26 09:01:25 -04:00
Daniel Waterworth
04a75b1cb3 Change the way notification items are created
Look for the specialised version first, before falling back to the
default. This allows the behaviour to be customised based on the type of
notification.
2019-06-26 09:01:25 -04:00
Daniel Waterworth
cdf0cd3ecd createWidgetFrom creates a new widget with an arbitrary base class 2019-06-26 09:01:25 -04:00
Daniel Waterworth
01a7fd4225 Make attach optionally take a list of widget names to try 2019-06-26 09:01:25 -04:00
Daniel Waterworth
41129f933d Rename notification-item to default-notification-item 2019-06-26 09:01:25 -04:00
Daniel Waterworth
7e70db3fb7 s/notName/notificationName/g 2019-06-26 09:01:25 -04:00
Joffrey JAFFEUX
7c9d62c280
FIX: prevents failure when TL was mutated on internal object (#7808) 2019-06-26 14:51:45 +02:00
Joffrey JAFFEUX
01de7e1444
FIX: calling action with a string is deprecated (#7807) 2019-06-26 12:42:46 +02:00
Joffrey JAFFEUX
e64544ae44
icon s/trash/trash-alt (#7806) 2019-06-26 12:31:49 +02:00
Joffrey JAFFEUX
ea2a9bc4fc
FIX: closes search-menu on escape (#7804) 2019-06-26 11:53:39 +02:00
Osama Sayegh
2eece2c41b
UX: add shortcut for deferring topics (#7798) 2019-06-25 07:20:55 +03:00
Joffrey JAFFEUX
c1ca942a77
REFACTOR: removes self pattern from safari-hacks lib (#7795) 2019-06-24 11:12:06 +02:00
Joffrey JAFFEUX
e064db35d9
REFACTOR: removes self pattern from eyeline lib (#7796) 2019-06-24 10:58:59 +02:00
Joffrey JAFFEUX
cea3a027f3
FIX: category-chooser search should be scoped to category (#7794) 2019-06-24 10:45:30 +02:00
Joffrey JAFFEUX
7cabc47945
UX: improves change-timestamp modal datepicker (#7771) 2019-06-24 10:24:54 +02:00
Robin Ward
02f6db4e59 FIX: Back button shenanigans when redirecting from index routes
This is a problem that has long plagued Discourse. The root issue here
is that we have to implement our own link click handler, because
Discourse allows users to create HTML blobs of content with links, and
when those links are clicked they must be handled by the Ember router.

This always involved a certain amount of use of private Ember APIs which
of course evolved over time.

The API has more or less stabilized in the last two years, however we
have hacks in our URLs to handle a dynamic root path, depending on how
forums have set up their filters and in what order.

This patch adds a special case for the root path so we needn't update
the URL ourselves otherwise, which preserves the back button on index
routes. The update call would otherwise insert an extra history event if
a route redirected on transition, breaking the back button.
2019-06-21 14:42:01 -04:00
Penar Musaraj
e51de4cc25
FEATURE: Add endpoint to individually update a theme setting (#7789)
- also adds a new staff action type called "change theme setting" for easier logging of staff changes to theme settings
2019-06-21 13:49:14 -04:00