* 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
* Simplify admin and add links to help pages
* Add line
* Add line
* Update app/views/layouts/admin.html.erb
* Update app/controllers/admin/configs_controller.rb
* Move svg to own file
* Adds image URL validation to image URLs in configs_controller.rb
* Adds additional image URLs to #valid_image_url in configs_controller.rb
* Adds tests around valid image URLs to configs_spec.rb
* WIP: sets strict conditions for before_action
* WIP: comments out unused code for draft PR
* WIP: cleans up configs_controller.rb for draft PR review
* Renames constant to more explicit IMAGE_FIELDS in configs_controller.rb
* Removes unnecessary comments from admin/configs_spec.rb
* Checks for matching keys in params and IMAGE_FIELDS in configs_controller
* Refactors #valid_image_urls and #valid_image_url in ConfigsController (THANK U, ANDY)
* Refactors image-related code and error messages in Admin::ConfigsController
* Renames expected_image_url to invalid_image_url and removes useless test
* Fix: update the tests to contain valid image urls so that they pass the validation.
* Adjusts tests & VALID_URL regex to validate images rather than image-specific URL
* Replaces $ with \z per Rhymes suggestion and feedback
* Adds accidentally removed code
Co-authored-by: Ridhwana <ridhwana.khan16@gmail.com>
* Let dev/test blow up if current_user is used erroneously
* Fix logic
* Fix click-to-edit permissions
* Change test to check for new behavior
* linting
* Edit tests
* Change test
* Clean up implementation
* Update comment
* Fix instance vars
* Update app/controllers/concerns/caching_headers.rb
* Merge origin and add request_store gem
* Update shell version when admin action taken
* Update app/controllers/admin/application_controller.rb
Co-authored-by: Alex <alexandersmith223@gmail.com>
Co-authored-by: Alex <alexandersmith223@gmail.com>
* Don't add to mailchimp for N/A circumstance
* Use class << self over self. methods
* Refactor and make add/remove tag mod idempotent
* Add missing param wiki_body_markdown
* Add errors_as_sentence b/c Tag not inheriting from AppRecord
* Refactor and Crayonsify tag page
* Use proper for attr to make label checkable
* Crayonsify moderator section
* Make placeholder white
* Remove remote: false for sync form submit
* Fix more merge conflicts
* Minor styling adjustments
* Fix color field value
* Don't add to Mailchimp community mod list if not enabled
* Add tests for new tag mod routes
* Add missing line oops
* Use self.method over class << self for new Rubyists
* Use more efficient query for getting tag mods
* Use parentheses to follow convention
* Use cleaner way of routing and controller
* Update tests to match new configuration
* Added form fields for the admin podcasts dashboard.
* Updated podcasts_controller.rb; Added parameters to the allowed params.
Updated edit.html.erb; Removed duplicated field.
Updated podcasts_spec.rb; Updated test.
* Fixed a typo.
* Refactored test which hopefully fixes the build
* Added missing comma.
* Added file fixture uploads.
* Fixed a typo.
* Update spec/requests/admin/podcasts_spec.rb
Co-authored-by: Fernando Valverde <fernando@visualcosita.com>
* Again fixed another typo.
* And again fixed another typo.
* Fixed merge conflicts.
Co-authored-by: Fernando Valverde <fernando@visualcosita.com>
Co-authored-by: rhymes <rhymes@hey.com>
* Add feature flag for profile admin section
* Fix spec description
* Also remove profile admin link from sidebar
* Disable profile admin routes based on feature flag
* Minor fixes
* Remove unnecessary object from spec
* Refactor AdminHelper
* Fix specs
* Fix remaining specs
* add organizations api request spec
* add organizations api controller
* add organizations api show route
* add show jbuilder file
* fix merge conflict on routes
* add organization show to api docs
* update created_at to iso format
* api docs add format field/cleanup
* Refactors #update in Admin::ArticlesController and articles_spec.rb
- Adds article.update to #update in the controller
- Shifts the update of co_author_ids further down in #update
- Adds additional tests to articles_spec.rb
- Refactors existing tests in articles_spec.rb
* Adds a gaurd clause to Admin::ArticlesController and refactors specs
* Removes ! from article creation in articles_spec.rb
* Adds new and edit views for events and removes them from the index view
* Fixes formatting issues in /admin/pages/index.html.erb
* Refactors /admin/events partial, new, and edit forms
* Updates admin_events routes to include all routes except destroy
* Refactors Admin::EventsController and adds #new and #edit actions
* specs: Adjusts admin_creates_new_event_spec to work with /admin/event changes
* Refactors the Admin::EventsController, routes, and events index even further
- Adds back placeholder text in Events form
- Removes unnecessary code from controller
- Reverts changes to routes
- Adjusts event_cover_image size on index.html.erb
* specs: Adds tests around creating and updating events to events_spec
* Adds pagination to Admin::EventsController #index to cap events at 20 per page
* Removes .all from Admin::EventsController and adds a line to index.html.erb
* Uses crayons classes for _event_form.html.erb
* Improve error messages and validation for pages
This could probably be cleaner, but I wanted to avoid changing behavior,
so there is a bit of redundancy.
In this commit, I also had to convert an if statement to a case
statement for Rubocop.
* Add system spec for editing pages
* Use errors_as_sentence
* 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
* Fix missing spaces in description of suggested_users
* Add config to use suggested_users instead of auto-generated suggestions
* Improve determine_follow_suggestions method
* Update app/lib/constants/site_config.rb
Improve the wording of the description of prefer_manual_suggested_users
Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>
* Apply new style to prefer_manual_suggested_users checkbox
Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>
* Update data exporter to handle admin send
* Match button with everything else
* Use proper redirect path
* Stub SiteConfig definition instead of setting it
Co-authored-by: Mac Siri <krairit.siri@gmail.com>
* Removed if statement by accident oops
* Remove non-functional boolean param and pass email directly
* Use refinement to conv to boolean instead of JSON.parse
* Rename to StringToBoolean
* Use 'using' in proper scope (not in method)
* Rename to_bool to to_boolean
* Refactor if statement, thanks rhymes!
* Fix small bugs in tests
* Remove tracking for export_email b/c no @user
Co-authored-by: Mac Siri <krairit.siri@gmail.com>
This is a request from one of our early adopter Forems. We should only
render the user count that appears on most of our sign up CTAs when a
Forem has a large userbase (initially, I'm setting that to 1000 users).
The change also removes a lot of duplicated markup by using some
partials to render the copy in the various auth CTAs.
Hopefully, this is written in such a way that changing opening up more
fine-grained control of these partials is trivial.
* Adds ability to publish/unpublish Podcasts via /admin/podacasts/id/edit
- Moves ability to Admin to remove reliability of resource_admin
- Adds published to podcast_params in Admin::PodcastsController
* Adds a test to check the successful publishing of a podcast in podcasts_spec.rb
* Reverts change to podcast.reload in podcasts_spec.rb
* Bust caches when navigation links are changed
* Remove extra line
* Add admin_action_taken_at to SiteConfig to reference later
* Format timestamp with rfc3339 and fix Specs
Co-authored-by: mstruve <mollylbs@gmail.com>
* Add configurable field for tag minimum feed score
* Use basic feed algorithm for Forems w/ basic
* Don't use cached value for Forems w/ basic feeds
* Revert "Use basic feed algorithm for Forems w/ basic"
This reverts commit f07853c2d5b28592aeae57f9f0313cba5aa6526e.
* Use a configurable hotness score
* Add a discussion comment
* Adjust tag feed min score default to 0
* Revert change to use original 7 score
* Use home feed minimum score
* Update app/controllers/stories_controller.rb
* Update app/controllers/stories_controller.rb
* Update app/controllers/stories_controller.rb
* Update app/controllers/stories_controller.rb
* Update app/controllers/stories_controller.rb
* Update app/controllers/stories_controller.rb
Co-authored-by: Ben Halpern <bendhalpern@gmail.com>