Commit Graph

86 Commits (feature-thread-pagination)

Author SHA1 Message Date
Matt Jankowski f1a6f4333a
Remove `redis-namespace` gem (#34742) 2 months ago
Matt Jankowski 4709121f72
Remove Legacy OTP Secret code (#34743) 2 months ago
Matt Jankowski 7cbdcd7b3f
Add role-specific user fabricators (#33437) 7 months ago
Matt Jankowski ab9c62e8c7
Add coverage for `User` validations (#33028) 8 months ago
Matt Jankowski 319109029d
Fix logic in "last used at per application" oauth token list (#32912) 8 months ago
Matt Jankowski 27f05e9016
Expand coverage for `User#token_for_app` (#32434) 10 months ago
Matt Jankowski cd7b670cd8
Reduce factory creation in `User#reset_password!` spec (#32021) 10 months ago
renovate[bot] 6801afa12f
Update dependency devise-two-factor to v6 [SECURITY] (#31957)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: David Roetzel <david@roetzel.de>
10 months ago
Matt Jankowski 5acec087ca
Simplify basic presence validations (#29664) 11 months ago
Matt Jankowski 14af5b47ac
Add coverage for model normalizations (#31734) 11 months ago
Matt Jankowski 02df1b4e4a
Finish email allow/deny list naming migration (#30530) 12 months ago
Matt Jankowski f1300ad284
Rename jobs/attachments rspec tag names (#29762) 1 year ago
Matt Jankowski 1e7d5d2957
Update `devise-two-factor` to version 5.0.0 (#28325)
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
1 year ago
Matt Jankowski 285f63c02e
Use composable query in `User.active` scope (#29775) 1 year ago
Claire 38b9d31f63
Improve email address validation (#29838) 1 year ago
Matt Jankowski 64f9939e39
Use `capture_emails` helper to improve email assertions in specs (#29245) 1 year ago
Matt Jankowski 117b507df5
Extract `subject` from `User#mark_email_as_confirmed!` spec (#29231) 1 year ago
Emelia Smith 68eaa804c9
Merge pull request from GHSA-7w3c-p9j8-mq3x
* Ensure destruction of OAuth Applications notifies streaming

Due to doorkeeper using a dependent: delete_all relationship, the destroy of an OAuth Application bypassed the existing AccessTokenExtension callbacks for announcing destructing of access tokens.

* Ensure password resets revoke access to Streaming API

* Improve performance of deleting OAuth tokens

---------

Co-authored-by: Claire <claire.github-309c@sitedethib.com>
1 year ago
Matt Jankowski 6d35a77c92
Combine repeated subjects in `models/user` spec (#28937) 2 years ago
Claire 98b5f85f10
Rename and refactor `User#confirm!` to `User#mark_email_as_confirmed!` (#28735) 2 years ago
Matt Jankowski 543d7890fd
Use normalizes to prepare `User` values (#28650)
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
2 years ago
Matt Jankowski 00341c70ff
Use Sidekiq `fake!` instead of `inline!` in specs (#25369) 2 years ago
Matt Jankowski c753b1ad35
Clean up of `RSpec/LetSetup` within `spec/models` (#28444) 2 years ago
Claire 6fed0fcbaa
Remove unneeded settings cleanup from specs (#28425) 2 years ago
Eugen Rochko cdc57c74b7
Fix unsupported time zone or locale preventing sign-up (#28035)
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
2 years ago
Matt Jankowski b06284c572
Fix `RSpec/HookArgument` cop (#27747) 2 years ago
Matt Jankowski bcd0171e5e
Fix `Lint/UselessAssignment` cop (#27472) 2 years ago
Matt Jankowski a1b27d8b61
Fix `Naming/VariableNumber` cop (#27447) 2 years ago
Matt Jankowski 6c0e3f490a
Fix RSpec/MissingExampleGroupArgument cop (#25310) 2 years ago
Matt Jankowski c42591356d
Fix `RSpec/DescribedClass` cop (#25104) 2 years ago
Matt Jankowski b896b16cb3
Fix RSpec/PredicateMatcher cop (#25102) 2 years ago
Matt Jankowski c97b611b6b
Fix RSpec/InferredSpecType cop (#24736) 2 years ago
Matt Jankowski 4cfe52635c
Add pending spec for User.those_who_can (#24724) 2 years ago
Nick Schonning a3393d0d07
Autofix Rubocop RSpec/MatchArray (#24050) 2 years ago
Eugen Rochko a9b5598c97
Change user settings to be stored in a more optimal way (#23630)
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
2 years ago
Nick Schonning 84cc805cae
Enable Style/FrozenStringLiteralComment for specs (#23790) 2 years ago
Nick Schonning 5116347eb7
Autofix Rubocop RSpec/BeEq (#23740) 2 years ago
Nick Schonning 4552685f6b
Autofix Rubocop RSpec/LeadingSubject (#23670) 2 years ago
Nick Schonning bd1d57c230
Autofix Rubocop RSpec/EmptyLineAfterSubject (#23719) 2 years ago
Nick Schonning 65ba0d92ef
Enable Rubocop RSpec/NotToNot (#23723) 2 years ago
Nick Schonning ac3561098e
Autofix Rubocop RSpec/LetBeforeExamples (#23671) 2 years ago
Nick Schonning c0a645f647
Autofix Rubocop RSpec/ExampleWording (#23667) 2 years ago
Nick Schonning 54318dcd6d
Autofix Rubocop RSpec/ClassCheck (#23685) 2 years ago
Nick Schonning 68b1071f86
Autofix Rubocop RSpec/BeNil (#23653) 2 years ago
Claire 6883fddb19
Fix account activation being triggered before email confirmation (#23245)
* Add tests

* Fix account activation being triggered before email confirmation

Fixes #23098
3 years ago
Eugen Rochko 44b2ee3485
Add customizable user roles (#18641)
* Add customizable user roles

* Various fixes and improvements

* Add migration for old settings and fix tootctl role management
3 years ago
Jeong Arm 2fd2666eea
Add test for user matching ip (#17572) 3 years ago
Claire e38fc319dc
Refactor and improve tests (#17386)
* Change account and user fabricators to simplify and improve tests

- `Fabricate(:account)` implicitly fabricates an associated `user` if
  no `domain` attribute is given (an account with `domain: nil` is
  considered a local account, but no user record was created), unless
  `user: nil` is passed
- `Fabricate(:account, user: Fabricate(:user))` should still be possible
  but is discouraged.

* Fix and refactor tests

- avoid passing unneeded attributes to `Fabricate(:user)` or
  `Fabricate(:account)`
- avoid embedding `Fabricate(:user)` into a `Fabricate(:account)` or the other
  way around
- prefer `Fabricate(:user, account_attributes: …)` to
  `Fabricate(:user, account: Fabricate(:account, …)`
- also, some tests were using remote accounts with local user records, which is
  not representative of production code.
4 years ago
Eugen Rochko 771c9d4ba8
Add ability to skip sign-in token authentication for specific users (#16427)
Remove "active within last two weeks" exception for sign in token requirement

Change admin reset password to lock access until the password is reset
4 years ago
Claire cbd0ee1d07
Update Mastodon to Rails 6.1 (#15910)
* Update devise-two-factor to unreleased fork for Rails 6 support

Update tests to match new `rotp` version.

* Update nsa gem to unreleased fork for Rails 6 support

* Update rails to 6.1.3 and rails-i18n to 6.0

* Update to unreleased fork of pluck_each for Ruby 6 support

* Run "rails app:update"

* Add missing ActiveStorage config file

* Use config.ssl_options instead of removed ApplicationController#force_ssl

Disabled force_ssl-related tests as they do not seem to be easily testable
anymore.

* Fix nonce directives by removing Rails 5 specific monkey-patching

* Fix fixture_file_upload deprecation warning

* Fix yield-based test failing with Rails 6

* Use Rails 6's index_with when possible

* Use ActiveRecord::Cache::Store#delete_multi from Rails 6

This will yield better performances when deleting an account

* Disable Rails 6.1's automatic preload link headers

Since Rails 6.1, ActionView adds preload links for javascript files
in the Links header per default.

In our case, that will bloat headers too much and potentially cause
issues with reverse proxies. Furhermore, we don't need those links,
as we already output them as HTML link tags.

* Switch to Rails 6.0 default config

* Switch to Rails 6.1 default config

* Do not include autoload paths in the load path
4 years ago