Commit Graph

87 Commits (stable-4.4)

Author SHA1 Message Date
Matt Jankowski f852da50f6
Add `User#email_domain` method to extract domain from email address (#35159) 4 weeks ago
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) 9 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) 11 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