Commit Graph

9 Commits (5d75799afaacb5b530d9abdb7464db779d3fcbe0)

Author SHA1 Message Date
Matt Jankowski c75df62ccc
Fix `RSpec/SubjectDeclaration` cop ()
Matt Jankowski 710745e16b
Fix RSpec/ContextWording cop ()
Matt Jankowski 00eb2269b6
Policies specs ()
Eugen Rochko 44b2ee3485
Add customizable user roles ()
* Add customizable user roles

* Various fixes and improvements

* Add migration for old settings and fix tootctl role management
Claire e38fc319dc
Refactor and improve tests ()
* 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.
Claire 76761d5fc0
Add ability for admins to delete canonical email blocks ()
* Add admin option to remove canonical email blocks from a deleted account

* Add tootctl canonical_email_blocks to inspect and remove canonical email blocks
Eugen Rochko 3134691948
Add support for reversible suspensions through ActivityPub ()
Takeshi Umeda d6fe0c94ca
Add account sensitized ()
* Add account sensitized

* Fix i18n normalize

* Fix description and spec

* Fix spec

* Fix wording
ysksn af56efdec5 Add specs for AccountPolicy ()