Commit graph

14 commits

Author SHA1 Message Date
Julianna Tetreault
ca6ba1af7d
Replace collective_noun with community_name (#11846) [deploy]
* Removes collective_noun and collective_noun_disabled from app

* Config Generalization: replaces community_qualified_name with community_name
  - Generalizes SiteConfig after the removal of collective_noun field
  - Updates copy where necessary to be readable with community_name
  - Makes the community_name SiteConfig description more explicit
  - Adds flexibility for Admins by removing appended "community"

* Adds a data_update script to remove collective_noun and collective_noun_disabled

* Removes appended community from stories_controller.rb

* Removes unnecessary quotation marks around SiteConfig.community_name.to_s

* Makes SiteConfig community_name description more explicit

* Removes topic from #email_from and replaces arg with _

* Removes argument from #email_from (facepalm)

* Reverts changes to application_mailer and notify_mailer_spec

* Removes default "Community" topic from application_mailer and makes topic optional

* Refactors #prepopulate_new_form to resolve Code Climate failures

* Refactors #email_from even further by use of a ternary operator per review suggestion

* Simplifies the data_update script used to remove collective_noun per review request

* Adds a data_update script to append community to community_name

* Updates data_update script to correctly append Community to community_name

* Removes RemoveCollectiveNounFromConfig and updates other script

* Removes superfluous false from data_update script

* Updates data_update script to be more idiomatic
2020-12-28 09:34:17 -07:00
rhymes
7eb7cef1b9
Upgrade Admin to Stimulus 2.0 (#11776)
* Upgrade Stimulus to 2.0

* Convert ArticleController to use Stimulus 2

* Convert ModalController to Stimulus 2

* Convert BufferController to Stimulus 2

* Convert ConfigController to use Stimuus 2

* Convert ImageUploadController to Stimulus 2

* Convert Reaction controller to Stimulus 2
2020-12-08 10:43:56 +01:00
Arit Amana
42e10e7b42
[EOY2020 Issue] Default new forems to Email Authentication only (#11696)
* Set default Auth Providers to empty array

* complete implementation; tests remain

* tests

* fix failing specs authenticator_spec.rb

* Fix failing specs

* fix more failing specs

* fix more failing specs 2

* update failing spec

* Update app/views/admin/configs/_auth_provider_settings.html.erb

Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>

* Update app/assets/stylesheets/admin.scss

Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>

Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>
2020-12-02 16:49:07 -05:00
Ben Halpern
f3a69bbd84
Allow Forems to specify which domains are allowed for registration (#11442)
* Allow authors to restrict which emails can sign up

* Add form and tests

* Check for email presence in allowed email flow

* Fix test domains

* Fix codeclimate issue
2020-11-17 08:43:46 -05:00
rhymes
f9506affb5
Use faster JS selection methods (#11409)
* Add JS tips section to frontend documentation

* Replace document.getElementsByTagName('body') with document.body

* Replace querySelectorAll with faster selecting methods where appropriate

* Replace querySelector with faster selecting methods where appropriate

* Fix typo

* Fix forEach and getElementsByClassName

* Change querySelector* to faster methods in erb files

* Change querySelector* to faster methods in ruby files

* Fix runkit tag

* Various fixes

* Update app/assets/javascripts/initializers/initializeEllipsisMenu.js

Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>

* Update app/assets/javascripts/utilities/slideSidebar.js

Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>

* Commenting out flaky spec

Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>
2020-11-16 17:35:50 +01:00
Josh Puetz
2223e5468b
Email login always on (#11307)
* Starting out

* Building away...

* Hooking buttons up

* Hook Auth Provider buttons to Array Field

* trying to fix NoNameError

* Remains InviteOnlyMode disable and tests

* Smashing remaining tasks

* Last of tasks

* add tests

* Complete specs and tests 😅

* Fix bug

* Additional guard

* pass event to functions

* Position Email Auth first

* Fix bug in Email Auth Modal

* Fix spacing issue

* Update docs for adminModal.js

* Show/hide Enabled Indicator with Enable/Undo buttons

* Complete Auth Providers functionality

* Only update `allow_email_password_registration` from admin

* Remove duplicated methods

* Some refactoring around fact that Email Login is now always on (#11382)

* Fix merge (again!)

Co-authored-by: Arit Amana <msarit@gmail.com>
Co-authored-by: Arit Amana <32520970+msarit@users.noreply.github.com>
2020-11-12 09:32:58 -06:00
Arit Amana
4d93112084
Make final Auth Provider Refactor code changes (#11303) 2020-11-07 07:49:16 -05:00
Arit Amana
08796b5cee
[Team Email Login] Refactor Authentication Provider Enable/Disable (#11185)
* Starting out

* Building away...

* Hooking buttons up

* Hook Auth Provider buttons to Array Field

* trying to fix NoNameError

* Remains InviteOnlyMode disable and tests

* Smashing remaining tasks

* Last of tasks

* add tests

* Complete specs and tests 😅

* Fix bug

* Additional guard

* pass event to functions

* Position Email Auth first

* Fix bug in Email Auth Modal

* Fix spacing issue

* Update docs for adminModal.js

* Show/hide Enabled Indicator with Enable/Undo buttons

* Complete Auth Providers functionality

* Update app/javascript/admin/controllers/config_controller.js

Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>

* Update app/javascript/admin/controllers/config_controller.js

Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>

* Update app/controllers/admin/configs_controller.rb

Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>

* Update helper names

* better implementation of EnabledIndicator show/hide

* Small copy changes

* Update spec/helpers/authentication_helper_spec.rb

Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>

* Update app/views/admin/configs/show.html.erb

Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>

* Update app/helpers/authentication_helper.rb

Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>

Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>
2020-11-06 18:19:34 -05:00
Lisa Sy
8d08191e9a
[Front-End Q/A] Config Authentication view (#11169)
* Update spacing and add Crayons classes

* Update modal interaction and style

* WIP Hide collapsed container

* Refactor invite only mode UX using tooltip

* Fix recaptcha toggle

* Implement button-text change and enabled-indicator hide

* Remove small icon alignment

* Update app/views/admin/configs/show.html.erb

* Fix icon and row alignment

* Fix enabled-indicator bug

Co-authored-by: Arit Amana <msarit@gmail.com>
2020-11-03 20:12:19 -08:00
Arit Amana
e00cb5df17
[Team Email Login] Genericize AdminConfig Modal (#11145)
* Genericize AdminConfig Modal

* Rename function, add JSDoc documentation

* Tests for modal-building function

* Still trying to get jest test to pass

* Fix failing jest test
2020-10-29 15:01:37 -04:00
Arit Amana
1912ffdc46
[Team Email Login] Refactor the Email Authentication flow (#11090)
* Hooked "Enable" button to hidden checkbox

* Hooked "Close" button to close email settings and show "Enable/Edit" button

* Additional hookups

* Start building generalized Modal blocks

* Everything hooked up except styling and a few Qs

* last of the hookups; ensure logic flow

* clean up

* specs to cover email auth refactor

* Fix bug surfaced by Vaidehi

* Incorporate PR feedback

* prevent email auth disable if invite-only-mode

* adjust emailAuthModal body text

* Sundry improvements

* Last-mile tweaks

* Trying to get 3rd party auth deselect to work

* delete unnecssary function

* remove superfluous comment

* Move inline styling into CSS file

* Incorporate PR feedback

* Incorporate more PR feedback

* Make Confirm btn intent clearer

* Add TODO comment
2020-10-28 13:37:11 -04:00
Jacob Herrington
c91c07920f
Add config option for Forem collective noun (#11107)
Not everyone will want to use "Community" to describe their Forem, so
now they have some flexibility there.
2020-10-27 12:45:52 -04:00
Arit Amana
8e57cf17ad
[Team Email Login] Admin enable/disable recaptcha during email signup (#10846)
* Initial Implementation

* Complete hookup of recaptcha guard

* Write tests for recaptcha during email signup

* Addressing PR changes 1

* Create helper method and write specs

* fix bug
2020-10-19 16:20:18 -04:00
Jacob Herrington
c37b283865
Allow Forem admins to enable an invite only mode. (#10758)
* Add invite only mode field to SiteConfig

* Add UI elements for invite only mode
2020-10-12 11:27:22 -04:00