* Basics might be working?
* Stop propagating button clicks in autocomplete pills
* Better blank slate
* Better location to stop propagation
* Remove author_id from org co-authors
* Move UserStore and try testing it
* Remove extraneous comments
* OH... that's what that does!
* Very basic testing
* Re-organize javascripts
* Rename & re-org for testing
* Cleanup
* More tests
* Remove unnecessary nesting
* Coninuing to try to bump coverage
* Include /packs/ in code coverage metric
* Try tweaking jest coverage more?
We probably can't collect coverage from all of packs/* (because coverage is too low) but maybe we can try to opt-in for newer areas as we go?
* Relocate JS tests, for build & coverage
* User ID exception on search, not fetch
* Remove commented-out console.log
---------
Co-authored-by: Mac Siri <krairit.siri@gmail.com>
* feat: update the layout for organizations
* feat: update the layout for an organization
* feat: organization logos are square
* feat: change the text on the org visit button
* feat: initialize the dropdown menu
* feat: trigger the modal
* feat: update the text in the model
* feat: tweak wording
* WIP/feat: hook up a route with an action that calls an organization delete worker.
* feat: redirect after showing the notice
* feat: update the authorization required to be super admin
* feat: add the notice to localization
* spec: integration test
* spec: fix
* spec: delete worker
* chore: update the link
* feat: add safe navigation
* feat: make sure that we show an error if the organization has credits
* fix: error message for modal unspent credits
* feat add the spec for the helper
* fix: remove rspec preface
* fix: small fixes to tests and I18n
* fix: updated the number of orgs
* feat: update the message
* feat: update the message
* chore: remove inclusion of helper
* feat: change the name of the parameter
* chore: newline
* Asynchronous organization destroy
* Notification after an organization was deleted
* Send data to Datadog and Honeybadger when org deletion failed
* Delete unused code
* Fixed Organization#destroyable? and organization delete specs
* Reorganized organization deletion specs
* Removed redundant specs
* Improved org deleted email text template
* Don't peform the org delete when a user or an org were not found
* Renamed user_id in the org delete worker
* Audit logging when deleten an organization
* Removed specs for tracking pixel and UTM params
* Changed slug for audit log on org delete
* Fixed schema.rb
* Adds a new admin setting for experience levels.
This is used in the post management UI to determine the range of experience. These values fallback to the ones we currently see in DEV, Total Newbies and Senior Devs. There is also a removal of the word coding when talking about experience level, since the context for each forem instance should be implied when referencing experience.
* Cleans up experience defaults
* Fixes instance_of usage
* Add destroy organization backend
* Add view for deleting org
* Add new line to end of file
* Refactor and move destroyable? to model
* Use a nice card to distinguish the message
* Prevent organizations from being deleted if they have credits
* Fix codeclimate issues
* Remove let_it_be_changeable for flakiness
* Allow user to have many orgs
* Allow users to handle multi orgs in settings
* Make rounded buttons inline
* Add multi org function to dashboards
* Fix merge conflicts
* Fix mistake in merge conflict fix oops
* Display the correct membership level
* Fix accessibility issues
* Display organizations for article editors
* Handle submitting org id with preact editors
* Make listings work with multiple organizations
* Allow listings to have multiple orgs on create
* Display the correct number of credits for each org
* Move script tag to Webpack
* Allow multi orgs for purchasing and viewing credits
* Use OrganizationMembership as authorization check
* Display multiple organizations for notifications
* Allow dashboard to be viewable under multi-orgs
* Remove unused method
* Add multi-org functionality for article editors
* Show pro dashboard buttons for member+ org levels
* Leave the correct organization
* Allow article API to change org id
* Add left-out authorization method oops
* Make nav buttons a bit more clear
* Fix merge conflict
* Fix adding org id for /api/articles and tests
* Fix tests for org policy
* Use proper logic for displaying org members
* Update org actions with new authorization
* Use correct org when creating a listing
* Remove additional payment charge oops
* Mark org notifications as read with authorization
* Remove deprecated post_as_organization attribute
* Use new org_admin syntax
* Remove deprecated org logic for article create and update
* Default all RSS posts to not belong to any org
* Render org_member page for guest users
* Update org policy spec to work with multi orgs
* Use org_membership for org traits and move identity code
* Use org_member trait
* Update to work with multi-orgs
* Validate article's org_id if param org_id is blank
* Make a let variable
* Remove unnecessary eager load for credits
* Fix HTML structure and org logic for non-org users
* Update credits spec for multi-org
* Add test for failed payment when purchased by org
* Lint listings_spec
* Test that the listing was created under the user
* Add tests for POST /listings multi-org
* Use double quotes for classes
* Fix /manage and a few other multi-org bugs
* Fix test for multi org
* Use correct method SQL exists? not Rails exist?
* Fix reads spec for multi-org
* Fix org_controller actions to work with multi org
* Test only multi org and not old usage and fix leave_org
* Fix org showing user profile img test for multi-org
* Fix org logic for users with no orgs
* Remove switch org functionality
* Update tests and add hidden param for org id
* Redirect to the specific organization
* Test other org button actions
* Use settings_notice instead of legacy notice and refactor
* Fix weird extra end issue prob from merge conflicts
* Test for with new flash key
* Fix user_views_org tests for multi-org
* Test for new flash message
* Update snapshot with new a11y html
* Move styling to stylesheet
* Add site admins functionality
* Move org_member? method in user model and refactor
* Use unspent_credits_count for organizations
* Add tests for /listings/new and minor bug fixes
* Use .present? in case of empty array
* Fix a lingering deprecated method
* Use greater than 1 for random numbers
* Add tests for counting spent and unspent credits
* Remove deprecated analytics role
* Make anchor tag a bit more readable
* Add OrganizationMembership table and model
* Add organization_membership associations
* Add unique indices for user_id and org_id
* Wrap update and create calls in transactions
* Remove specs of deprecated analytics_beta_tester
* added organization policy + spec
* user specs for is_org_admin?
* added authroize to organization controller
* admin policy + specs
* deleted enforce admin due to pundit policy redundancy
* applied admin policy to entire admin namespace
* refactoring analytics controller WIP - wanna test codeship
* Add protection against reactions to unpublished articles (#473)
* Add chat channel policy and spec (#474)
* Add comment policy and specs (#475)
* Fix edge case with apostrophes
* Add comment policy and specs
* Add login for deleting comment spec
* Change test to raise pundit error instead of 404
* Clean up comment destroy request specs
* Remove redundant raise
* Whitelist columns on to_json call (#477)
* Add pundit policy for several controllers (#476)
* Add pundit policy for several controllers
* Adjust video spec
* Fix tag request specs
* Add proper twilio tokens request specs
* Remove puts statements
* Add a couple basic request specs (#478)
* Add a few tests and fix user tag color bug (#482)
* Refactor handle_tag_index in stories_controller (#481)
* Modify valid_request_origin? (#483)
* Add misc specs and remove banned attribute from user model (#484)
* Fix missing Cloudinary tags and misc specs (#486)
* removing current_user_is_admin? to use .is_admin? method
* added missing org policy routes
* Add comment for all public controllers
* Fix edge case for test
* Authorize mod controller and add specs
* Refactor methods via inheritance and use only super_admin role
* Create policy method for analytics via article_policy and refactor
* Capitalize all buttons in dashboard page
* Fix org tests and remove old admin test
* Use only happy path for analytics
* Fix tests to use Pundit error
* Update org_policy spec
* Make org proof a required field
* Fix color picker and other minor org adjustments
* Add MVP of org add'l sidebar
* Add proof to org factory
* Fix org create action and fix tests
* Add new org fields to admin panel & lint
* Add proof to org edit for backward compatibility
* Add org info to edit preview
* Move preview edit notice to inside article div
* MVP of badge "final" steps
* Add info to user sidebar and clean up badge commit
* Modify sidebar for data
* Add organization decorator
* Add conditional so only users have new swipe nav, not orgs
* Add cloudinary prefix to badges
* Disallow duplicate badges
* Add CSRF tags to welcome index page
* Clean up auth service code a bit
* Add analytics role to approved org org_admins
* Add toggle links for org admins with no posts
* Fix wrong role name and add test
* Adjust validation for user fields
* Add test for user_role_service
* Fix confusing boolean