Commit Graph

24207 Commits

Author SHA1 Message Date
Kris
933dde9419
A11Y: Add rowheader to topic title TDs (#12092) 2021-02-17 00:00:34 -05:00
Kris
355b8f69af
UX: Fix excess line breaks in login modal alerts (#12104) 2021-02-16 21:22:49 -05:00
Martin Brennan
fb83757edb
FIX: Auto close topic from category settings based on topic created_at (#12082)
Previously when inheriting category auto-close settings for a topic, those settings were disrupted if another topic timer was assigned or if a topic was closed then manually re-opened.

This PR makes it so that when a topic is manually re-opened the topic auto-close settings are inherited from the category. However, they will now be based on the topic created_at date. As an example, for a topic with a category auto close hours setting of 72 (3 days):

* Topic was created on 2021-02-15 08:00
* Topic was closed on 2021-02-16 10:00
* Topic was opened again on 2021-02-17 06:00

Now, the topic will inherit the auto close timer again and will close automatically at **2021-02-18 08:00**, which is based on the creation date. If the current date and time is greater than the original auto-close time (e.g. we were at 2021-02-20 13:45) then no auto-close timer is created.

Note, this will not happen if the topic category auto-close setting is "based on last post".
2021-02-17 07:51:39 +10:00
Arpit Jalan
94036a6f49
FIX: force refresh staff action logs when transitioning from site settings (#12096) 2021-02-17 00:18:39 +05:30
Bianca Nenciu
fa3eb1f7fc
FIX: Category redirect to correct slug should not loop (#11772)
The server responds with a redirect to URLs with wrong slugs, even when
the slug was the correct but in the encoded form (if it contained
special characters).
2021-02-16 17:54:50 +02:00
Bianca Nenciu
d89c5aedbe
FIX: Fix subcategory, tag drops and none values (#11934)
* FIX: Generate correct URLs for category and tag drops

* DEV: Remove unused properties

* FIX: No subcategory and tag filter did not work
2021-02-16 17:54:24 +02:00
Bianca Nenciu
fad1fac196
FIX: Update topic_count when updating visibility (#11946)
Updating a topic's visibility did not increase or decrease the
topic_count of a category, but Category.update_stats does ignore
unlisted topics which resulted in inconsistencies when deleting
such topics.
2021-02-16 17:45:12 +02:00
Osama Sayegh
277eae97e1
FIX: Use autocomplete=discourse in select-kit to disable autocomplete in Chrome (#12094)
Chrome ignores `autocomplete="off"` on input fields, but as a workaround we can supply a nonsensical value (`discourse` or anything else) to the `autocomplete` attribute and it'll disable autocomplete.

Context: https://meta.discourse.org/t/-/107484/66?u=osama and https://meta.discourse.org/t/-/140884/13?u=osama.
2021-02-16 12:46:46 +03:00
Martin Brennan
0cba1fafe4
DEV: debug: false for service workers to stop log spam via workbox (#12093) 2021-02-16 14:01:19 +10:00
Martin Brennan
9f0f801ae3
FIX: Do not mark group_flair images as secure on upload (#12081)
See https://meta.discourse.org/t/secure-media-uploads-breaks-group-flair-image/173671/4

Group flair image uploads definitely do not need to be secure.
2021-02-16 12:34:03 +10:00
Martin Brennan
c0c7c237aa
FIX: Clean up topic-timer-info CSS classes, add edit button, and improve UI (#12080)
This PR adds an edit button to the topic timer info message which opens the modal.

Also, I have cleaned up a few more places where we were referencing "topic status update" which is what these were called prior to being called topic timers.

The category settings for auto-close topic hours has now also been modified to use the new relative-time-picker component.

Finally, the relative-time-picker input step and min is dynamic based on mins/other intervals selected, see https://review.discourse.org/t/feature-relative-time-input-for-timers-and-bookmarks-and-promote-auto-close-after-last-post-timer-12063/19204/7?u=martin
2021-02-16 12:07:30 +10:00
Joffrey JAFFEUX
f80e6a2357
FIX: adds google tracking to page publishing (#12090) 2021-02-15 19:00:35 +01:00
Joffrey JAFFEUX
323a5f22e7
A11Y: makes select-kit header a listbox (#12078)
Note that for now pressing enter doesn’t make anything, this is awaiting another change.
2021-02-15 18:22:10 +01:00
Arpit Jalan
85c4e8fd32
FEATURE: support mark tag (#12088)
This commit adds support for `mark` tag for highlighting text content.
2021-02-15 21:47:30 +05:30
Joffrey JAFFEUX
c5d0a33cc5
A11Y: adds support for aria-current through d-navigation-item (#12079) 2021-02-15 15:34:25 +01:00
Gerhard Schlager
f71ff2c34b
UX: relative-time-picker should use pluralized strings (#12086) 2021-02-15 14:15:22 +01:00
Joffrey JAFFEUX
467b075ef7
A11Y: makes aria-owns an ID and not a data attribute (#12075) 2021-02-15 12:32:09 +01:00
Joffrey JAFFEUX
71e9c2e50b
A11Y: sets has-popup as menu for select-kit components (#12074) 2021-02-15 12:31:51 +01:00
Joffrey JAFFEUX
79d7c4a3c2
A11Y: makes quote controls accessible (#12073) 2021-02-15 12:31:35 +01:00
David Taylor
d8705ee0ad
UX: Fix local-dates styling (#12085)
Renames the new `relative-time` component to `relative-time-picker` to
avoid CSS class conflict with local-dates.
2021-02-15 10:44:30 +00:00
Arpit Jalan
c256b94ae0
UX: when auto-selecting topic make sure the focus is on selected topic (#12083) 2021-02-15 16:12:45 +05:30
Arpit Jalan
901d6080df
FIX: do not show SSO last payload to moderators (#12084) 2021-02-15 16:12:06 +05:30
Martin Brennan
84c7b2c404
FEATURE: Relative time input for timers and bookmarks and promote auto-close after last post timer (#12063)
This PR adds a new relative-time component, that is an input box with a SK dropdown of minutes, hours, days, and months which outputs the duration selected in minutes. This new component is used in the time shortcuts list (used by bookmarks and topic timers) as a new Relative Time shortcut.

Also in this PR, I have made the "Auto-Close After Last Post" timer into a top level timer type in the UI, and removed the "based on last post" custom time shortcut.
2021-02-15 12:49:57 +10:00
Krzysztof Kotlarek
ad3ec5809f
FIX: Dismiss new with better migration (#12062)
Original PR was reverted because of broken migration https://github.com/discourse/discourse/pull/12058

I fixed it by adding this line
```
          AND topics.id IN(SELECT id FROM topics ORDER BY created_at DESC LIMIT :max_new_topics)
```

This time it is left joining a limited amount of topics. I tested it on few databases and it worked quite smooth
2021-02-15 08:50:33 +11:00
Jordan Vidrine
7fe5368718
UX: Second Factor + Alert Display (#12071)
* UX: Second Factor + Alert Display

This commit removes JS edits of the modal-alert and uses CSS instead. This commit also adds some styling to the 2FA login when using a key instead of a 2FA authenticator.
2021-02-12 16:24:13 -06:00
Arpit Jalan
46e7d303b1
FEATURE: when moving posts to existing topic auto-select single topic (#12064) 2021-02-12 23:11:20 +05:30
Neil Lalonde
cc0d2b623f UX: show plugin descriptions on admin plugins page 2021-02-12 11:38:50 -05:00
David Taylor
ae64490162
FIX: Allow all tags in site/theme settings, ignore tag group restrictions (#12067) 2021-02-12 14:59:21 +00:00
Vinoth Kannan
834388dbe0
UX: trim @ char from start of the username string in search. (#12060)
Currently, we're unable to search users by their username with the `@` symbol in "Posted by" filter on advanced search page.
2021-02-12 19:38:13 +05:30
Penar Musaraj
900d4187ef
DEV: Prevents rate limits for new feature checks on multisite (#12053) 2021-02-12 08:52:59 -05:00
Osama Sayegh
293fd1f743
DEV: Deprecate {{user-selector}} and replace it with {{email-group-user-chooser}} (#12042)
`{{user-selector}}` is now deprecated and it will be removed from core in Discourse 2.8. All instances of `{{user-selector}}` has been replaced with `{{email-group-user-chooser}}`.
2021-02-12 13:51:36 +03:00
Martin Brennan
ff1ac57feb
FIX: Validate duration minutes values for topic timer (#12040)
Add server and client side validations to ensure topic timer durations cannot exceed 2 years and cannot be less than or equal to 0.
2021-02-12 09:05:14 +10:00
Krzysztof Kotlarek
a696cc07d2
Revert "FEATURE: Ability to dismiss all new topics (#12018)" (#12058)
This reverts commits 7426764af4 and f5b18e2a31
2021-02-12 08:50:25 +11:00
Blake Erickson
395a903cf6
DEV: Show warning message when using ember css selectors (#12036)
* DEV: Show warning message when using ember css selectors

When editing the theme css via the admin UI a warning message
will be displayed if it detects that the `#emberXXX` or `.ember-view`
css selectors are being used. These are dynamic selectors that ember
generates, but they can change so they should not be used.

* Update error message text to be more helpful

* Display a warning instead of erroring out

This allows the theme to still be saved, but a warning is displayed.

Updated the tests to check for the error message.

Updated the pre tags css so that it wraps for long messages.
2021-02-11 13:48:57 -07:00
Jordan Vidrine
80bcebb71f
UI: Specify social button styling (#12054)
This commit adds more specificity to the social buttons styling.
2021-02-11 14:32:33 -06:00
Kris
fcf674f106
UX: Prevent badges on usercards from overflowing (#12037) 2021-02-11 13:41:58 -05:00
Kris
04d0bf9c4a
UX: Improve tag and assign display in search (#12039) 2021-02-11 13:41:43 -05:00
Kris
eec093918f
FIX: adjust width to avoid horizontal overflow (#12038) 2021-02-11 13:41:34 -05:00
Penar Musaraj
578f753a13
UX: Adjust focus styles for autocomplete input (#12051) 2021-02-11 13:11:21 -05:00
Robin Ward
2068780493
FIX: When adding a quote when the composer is closed, add a newline (#12049)
Normally we look at where the cursor is, but when the composer is closed
we don't have a cursor and just append at the end. This fix adds a new
line to make sure quotes will always work when inserted when the
composer is closed.
2021-02-11 12:45:20 -05:00
Arpit Jalan
12b57c0dee
FEATURE: Add "Recently read topics" tab to user activity page (#12047) 2021-02-11 22:36:50 +05:30
David Taylor
49affb0542
UX: Hide external login column when account creation in progress (#12048) 2021-02-11 16:26:29 +00:00
Jordan Vidrine
5e1c8111d3
UI: Adjust gradient, icon hover, capitalizations (#12045)
This commit adjusts the scroll gradient on the login modal, changes `email / username` to `Email / Username` and adjusts the color of social button icons on hover in the login modal.
2021-02-11 10:08:01 -06:00
David Taylor
830797a9c3
FEATURE: Allow post/topic thumbnails to be prioritized via markdown (#12044)
Previously we would always take the first image in a post to use as the
thumbnail. On media-heavy sites, users may want to manually select a
specific image as the topic thumbnail. This commit allows this to be
done via a `|thumbnail` attribute in markdown.

For example, in this case, bbb would be chosen as the thumbnail:

```
![alttext|100x100](upload://aaa)
![alttext|100x100|thumbnail](upload://bbb)
```
2021-02-11 15:44:41 +00:00
Penar Musaraj
a6bb7e6d25
DEV: Live reload styles in Ember CLI (#12043) 2021-02-11 10:36:34 -05:00
Krzysztof Kotlarek
f5b18e2a31
FEATURE: Ability to dismiss all new topics (#12018)
Follow up https://github.com/discourse/discourse/pull/11968

Dismiss all new topics using the same DismissTopicService. In addition, MessageBus receives exact topic ids which should be marked as `seen`.
2021-02-11 13:35:09 +11:00
Jordan Vidrine
47574e5985
FIX: Login UI Fixes (#12034)
This commit adjusts the height of the left side of the login modal, and changes the scroll gradient positioning.
2021-02-10 20:32:44 -05:00
Penar Musaraj
f188091a55
UX: Remove Convert option for system themes (#12033) 2021-02-10 19:20:13 -05:00
Krzysztof Kotlarek
a1aa37758c
FIX: do not notify when the hidden tag is added or removed (#12025)
The bug was mentioned on meta https://meta.discourse.org/t/users-are-seeing-handling-of-unhandled-tag-again/155367

It was related to users who are watching a specific topic. In that case, when the hidden tag was added or removed to the topic they were notified by `NotifyTagChangeJob`.

That job should take hidden tags into consideration. If all changed tags are in a hidden group, it should exclude user not belong to that group.

At the same time, if visible to anyone tag is added or removed users watching topic should be notified.
2021-02-11 10:03:45 +11:00
Jordan Vidrine
4580595bd8
Login signup zazz (#11957)
This PR re-styles the login and create account modals.
2021-02-10 14:53:18 -06:00
Mark VanLandingham
50c3cc7d75
DEV: Trigger appEvent when topic progress component moves (#12030) 2021-02-10 14:07:10 -06:00
Penar Musaraj
544a4e4b48
UX: Changes to new features section in admin dashboard (#12029) 2021-02-10 13:12:04 -05:00
Penar Musaraj
f2de7842bb
FEATURE: Support keyboard back/forward navigation on DiscourseHub (#12028) 2021-02-10 11:25:32 -05:00
Joffrey JAFFEUX
ad7ca46231
A11Y: sets the html lang to user's locale when possible (#12007) 2021-02-10 16:12:09 +01:00
Vinoth Kannan
7354636502
FIX: return 404 not found error if a topic is deleted. (#11987)
Currently, it's returning 403 invalid access error which causes issue in Google webmaster tools.
2021-02-09 16:47:06 +11:00
Bianca Nenciu
f4db1675f3
FIX: Check if post.topic exists before publishing topic updates (#11900) 2021-02-09 16:41:22 +11:00
Kris
fcdf7ef019
UX: Remove 2px border from some select-kit buttons (#12016) 2021-02-09 16:35:10 +11:00
Ahmed Gagan
45403e57b6
DEV: Plugin-outlet for adding new item in user-notifications filter navigation bar (#12000) 2021-02-09 16:34:09 +11:00
Krzysztof Kotlarek
354ec6694a
FEATURE: Ability to dismiss new topics in a specific tag (#11968)
* FEATURE: Ability to dismiss new topics in a specific tag

Follow up of https://github.com/discourse/discourse/pull/11927

Using the same mechanism to disable new topics in a tag.

* FIX: respect when category and tag is selected
2021-02-09 10:39:30 +11:00
Jarek Radosz
3e1a293554
DEV: Don't skip tests that run fine in legacy env (#12011)
We didn't run some of the plugin tests since #11899. I'd file that under "whoops".
2021-02-08 18:41:32 +01:00
Gerhard Schlager
9ce7ec24e2
FIX: Some error messages used wrong translation key (#12012) 2021-02-08 17:57:59 +01:00
Rafael dos Santos Silva
ceab1c9fdf
FEATURE: Handle user agent push subscription change events (#11994)
A user browser may rotate a user subscription endpoint/keys
anytime.

Currently, Discourse will receive a 4XX response while trying to
deliver a push notification and silently unsubscribe the device.

With this change, we will gracefully handle desativating the old
subscription and the replacement creation with the need for the user
to resubscribe manually every time it breaks.

https://meta.discourse.org/t/-/125179?u=falco
2021-02-08 12:09:52 -03:00
David Taylor
7e6cb1ff2e
FIX: Correct server error for starting SSO login, and add spec (#12010)
Followup to 821bb1e8cb
2021-02-08 10:59:43 +00:00
Joffrey JAFFEUX
6d31ead050
A11Y: correctly sets a name on combo-boxes for single selects (#12009) 2021-02-08 11:24:42 +01:00
Joffrey JAFFEUX
898772787c
DEV: makes aria-expanded boolean check strict (#12008)
{{d-button ariaExpanded=xxx}} only accepts Boolean now.
2021-02-08 11:18:39 +01:00
David Taylor
821bb1e8cb
FEATURE: Rename 'Discourse SSO' to DiscourseConnect (#11978)
The 'Discourse SSO' protocol is being rebranded to DiscourseConnect. This should help to reduce confusion when 'SSO' is used in the generic sense.

This commit aims to:
- Rename `sso_` site settings. DiscourseConnect specific ones are prefixed `discourse_connect_`. Generic settings are prefixed `auth_`
- Add (server-side-only) backwards compatibility for the old setting names, with deprecation notices
- Copy `site_settings` database records to the new names
- Rename relevant translation keys
- Update relevant translations

This commit does **not** aim to:
- Rename any Ruby classes or methods. This might be done in a future commit
- Change any URLs. This would break existing integrations
- Make any changes to the protocol. This would break existing integrations
- Change any functionality. Further normalization across DiscourseConnect and other auth methods will be done separately

The risks are:
- There is no backwards compatibility for site settings on the client-side. Accessing auth-related site settings in Javascript is fairly rare, and an error on the client side would not be security-critical.
- If a plugin is monkey-patching parts of the auth process, changes to locale keys could cause broken error messages. This should also be unlikely. The old site setting names remain functional, so security-related overrides will remain working.

A follow-up commit will be made with a post-deploy migration to delete the old `site_settings` rows.
2021-02-08 10:04:33 +00:00
Joffrey JAFFEUX
205db66864
A11Y: Adds support for aria-expanded and aria-controls to btn (#11846)
This commit also uses this new feature for the expand/collapse control of the user activity page.
2021-02-08 08:45:37 +01:00
Joffrey JAFFEUX
8957e4d9d0
A11Y: makes user notifications list more accessible (#11992)
Previous markup used to be

```
<div>
  <div>
    <li>
```

Instead we will now have:

```
<ul>
  <li>
    <div>
```

Note this commit also adds two things:
- ability to override tagName of a widget when attaching it
- ability to pass opts and otherOpts to {{attach}}, it could be useful in templates but is mostly useful to test `tagName` for now
2021-02-08 08:45:14 +01:00
Osama Sayegh
dbb015f03e
FIX: Topic progress bar should be on the left in RTL layouts (#11999) 2021-02-08 17:42:55 +11:00
Osama Sayegh
f700e318a4
DEV: Add CSRF meta tags to pages served by Ember CLI server (#11993)
Signed-off-by: OsamaSayegh <asooomaasoooma90@gmail.com>
2021-02-06 01:18:29 +03:00
Kris
ded0f5b4e5
UX: Remove Helvetica from our font stack (#11876)
Arial is more consistently available across operating systems and aligns better.
2021-02-05 17:01:21 -05:00
Penar Musaraj
015ea28778
UX: Small fix for Chrome focus style on replies button (#11996) 2021-02-05 14:02:30 -05:00
Kris
a2946b0728
Move category dropdown changes to desktop only (#11995)
follow-up to 615a091
2021-02-05 11:30:08 -05:00
Kris
3ed6747bf2
UX: Show caret icon on user notification dropdown (#11991) 2021-02-05 10:30:36 -05:00
David Taylor
d1b289daaa
DEV: Cleanup detection of user summary route for header collapsing (#11985)
Previously it was using various willTransition and didTransition hooks
which can be quite fragile, especially when removing the
intermediate loading state.
2021-02-05 09:16:18 +00:00
Ahmed Gagan
f6e6ae5e24
DEV: Allows widgets to extend post-controls (#11897) 2021-02-05 09:27:47 +01:00
Vinoth Kannan
792c2b94f6
UX: don't display tag notification menu on category page. (#11989)
If both category and tag are selected then we shouldn't display a notification menu.
2021-02-05 09:19:00 +05:30
Kris
13dba16e7b
UX: Fix reply where modal layout (#11990) 2021-02-05 14:37:02 +11:00
Martin Brennan
4af77f1e38
FEATURE: Allow durations < 1 hour and < 1 day for topic timers where duration is specified (auto delete replies, close based on last post) (#11961)
This PR allows entering a float value for topic timers e.g. 0.5 for 30 minutes when entering hours, 0.5 for 12 hours when entering days. This is achieved by adding a new column to store the duration of a topic timer in minutes instead of the ambiguous both hours and days that it could be before.

This PR has ommitted the post migration to delete the duration column in topic timers; it will be done in a subsequent PR to ensure that no data is lost if the UPDATE query to set duration_mintues fails.

I have to keep the old keyword of duration in set_or_create_topic_timer for backwards compat, will remove at a later date after plugins are updated.
2021-02-05 10:12:56 +10:00
Kris
0fb1c122f4
UX: Clarify user rejection modal (#11967) 2021-02-04 15:20:07 -05:00
Joe
c307604d7f
DEV: adds below-suggested-topics plugin outlet (#11980) 2021-02-05 03:41:12 +08:00
Kris
6d6436e9e7
UX: Fix & clarify bulk notification change modal (#11969) 2021-02-04 14:35:47 -05:00
Kris
c40c858233
REFACTOR: Remove d-button block helpers (#11970) 2021-02-04 14:35:23 -05:00
Penar Musaraj
2bc739eaa5
UX: Use bright color for primary button hover on dark schemes (#11979) 2021-02-04 13:31:09 -05:00
Penar Musaraj
85310f82f5
FIX: Don't cancel filtering on second "n replies" tap (#11975)
Fixes an issue introduced in 0f31a221c9.
2021-02-04 11:41:01 -05:00
Penar Musaraj
eb29827e9d
UX: Adjust focus styles for topic post menu, composer cancel (#11977) 2021-02-04 10:28:35 -05:00
Kris
dbb5c373ce
UX: popup menu buttons need focus style (#11962) 2021-02-04 09:37:45 -05:00
Penar Musaraj
12ffba771c
FIX: Improve SCSS handling in components (#11963)
- ignores errors when including component SCSS in parent theme
- adds support for SCSS `@import`s in components' `color_definitions.scss` files
2021-02-04 08:51:18 -05:00
Osama Sayegh
b580e3e657
DEV: Add more @ember modules for plugins compatibility with Ember CLI (#11972)
Some plugins (like discourse-calendar) import things from `@ember/string` and `rsvp`, so we need to add them in order for the plugins to work with Ember CLI.
2021-02-04 16:26:06 +03:00
Arpit Jalan
309adb82ba
UX: add a confirmation modal to "Remove All Tags" action (#11973)
UX: update label for "Remove Tags" action
2021-02-04 18:30:01 +05:30
Arpit Jalan
06225abe93
FIX: process new invites when existing users are already group members (#11971)
If a list of email addresses is pasted into a group’s Add Members form
that has one or more email addresses of users who already belong to the
group and all other email addresses are for users who do not yet exist
on the forum then no invites were being sent. This commit ensures that
we send invites to new users.
2021-02-04 15:36:08 +05:30
Osama Sayegh
97b55af9cf
DEV: Use @action decorator (#11955)
Follow up to db7b7eed9d
2021-02-04 14:41:53 +11:00
Rafael dos Santos Silva
d518b302a0
FIX: Composer upload icon regression because of WEBP (#11959)
Similar to
ba9fbb3443

Reported on
https://meta.discourse.org/t/image-icon-has-changed-to-upload-icon/178247?u=falco
2021-02-04 14:41:07 +11:00
Kris
e7ca1ed6bf
UX: remove unneeded margin from user stream (#11964) 2021-02-04 14:39:43 +11:00
Kris
4f588a0569
UX: fix button alignment on log-in required page (#11965) 2021-02-04 14:38:58 +11:00
Kris
615a091707
UX: ensure category breadcrumbs have consistent height (#11966) 2021-02-04 14:38:12 +11:00
Krzysztof Kotlarek
f39e7fe81d
FEATURE: New way to dismiss new topics (#11927)
This is a try to simplify logic around dismiss new topics to have one solution to work in all places - dismiss all-new, dismiss new in a specific category or even in a specific tag.
2021-02-04 11:27:34 +11:00
Martin Brennan
e58f9f7a55
DEV: Move logic for rate limiting user second factor to one place (#11941)
This moves all the rate limiting for user second factor (based on `params[:second_factor_token]` existing) to the one place, which rate limits by IP and also by username if a user is found.
2021-02-04 09:03:30 +10:00
Robin Ward
61f5d501cb
DEV: Migrate to Ember CLI (#11932)
This encompasses a lot of work done over the last year, much of which
has already been merged into master. This is the final set of changes
required to get Ember CLI running locally for development.

From here on it will be bug fixes / enhancements.

Co-authored-by: Jarek Radosz <jradosz@gmail.com>
Co-authored-by: romanrizzi <rizziromanalejandro@gmail.com>

Co-authored-by: Jarek Radosz <jradosz@gmail.com>
Co-authored-by: romanrizzi <rizziromanalejandro@gmail.com>
2021-02-03 14:22:20 -05:00
Jarek Radosz
8ad5284cf7
FIX: Don't create email invites when SSO is on or local logins are off (#11951)
A more general, lower-level change in addition to #11950.

Most code paths already check if SSO is enabled or if local logins are disabled before trying to create an email invite.
This is a safety net to ensure no invalid invites sneak by. 

Also includes:
FIX: Don't allow to bulk invite when SSO is on (or when local logins are disabled)
This mirrors can_invite_to_forum? and other email invite code paths.
2021-02-03 19:01:23 +01:00