1
0
mirror of https://framagit.org/tykayn/mastodon.git synced 2023-08-25 08:33:12 +02:00
Commit Graph

66 Commits

Author SHA1 Message Date
Claire
be493b6c0d Merge branch 'main' into glitch-soc/merge-upstream
Conflicts:
- `app/models/account.rb`:
  Not a real conflict, just upstream getting rid of unused constants too close
  to glitch-soc-specific contents.
  Removed unused constants like upstream did.
- `app/models/trends.rb`:
  Conflict because glitch-soc disabled email notifications for trending links.
  Upstream has refactored this quite a bit and added trending posts.
  Took upstream code, but disabling the extra trending stuff will come in
  another commit.
- `app/views/admin/trends/links/index.html.haml`:
  Conflict due to glitch-soc's theming system.
  Ported upstream changes accordingly.
2022-02-26 09:29:23 +01:00
Eugen Rochko
27965ce5ed
Add trending statuses ()
* Add trending statuses

* Fix dangling items with stale scores in localized sets

* Various fixes and improvements

- Change approve_all/reject_all to approve_accounts/reject_accounts
- Change Trends::Query methods to not mutate the original query
- Change Trends::Query#skip to offset
- Change follow recommendations to be refreshed in a transaction

* Add tests for trending statuses filtering behaviour

* Fix not applying filtering scope in controller
2022-02-25 00:34:14 +01:00
Claire
f224237862 Merge branch 'main' into glitch-soc/merge-upstream
Conflicts:
- `db/schema.rb`:
  Conflict due to glitch-soc adding the `content_type` column on status edits
  and thus having a different schema version number.
  Solved by taking upstream's schema version number, as it is higher than
  glitch-soc's.
2022-02-17 10:58:44 +01:00
Eugen Rochko
564efd0651
Add appeals ()
* Add appeals

* Add ability to reject appeals and ability to browse pending appeals in admin UI

* Add strikes to account page in settings

* Various fixes and improvements

- Add separate notification setting for appeals, separate from reports
- Fix style of links in report/strike header
- Change approving an appeal to not restore statuses (due to federation complexities)
- Change style of successfully appealed strikes on account settings page
- Change account settings page to only show unappealed or recently appealed strikes

* Change appealed_at to overruled_at

* Fix missing method error
2022-02-14 21:27:53 +01:00
Claire
1b493c9fee Add optional hCaptcha support
Fixes 

This requires setting `HCAPTCHA_SECRET_KEY` and `HCAPTCHA_SITE_KEY`, then
enabling the admin setting at
`/admin/settings/edit#form_admin_settings_captcha_enabled`

Subsequently, a hCaptcha widget will be displayed on `/about` and
`/auth/sign_up` unless:
- the user is already signed-up already
- the user has used an invite link
- the user has already solved the captcha (and registration failed for another
  reason)

The Content-Security-Policy headers are altered automatically to allow the
third-party hCaptcha scripts on `/about` and `/auth/sign_up` following the same
rules as above.
2022-01-24 21:22:13 +01:00
Eugen Rochko
14f436c457
Add notifications for statuses deleted by moderators () 2022-01-17 09:41:33 +01:00
Claire
081e4426f8
Fix admin interface crash when displaying deleted user () 2022-01-16 20:57:37 +01:00
Eugen Rochko
8e84ebf0cb
Remove IP tracking columns from users table () 2022-01-16 13:23:50 +01:00
Claire
7f803c41e2
Add ability to purge undeliverable domains from admin interface ()
* Add ability to purge undeliverable domains from admin interface

* Add tests
2021-12-17 23:01:21 +01:00
Eugen Rochko
0fb9536d38
Add batch suspend for accounts in admin UI () 2021-12-05 21:48:39 +01:00
Eugen Rochko
6e50134a42
Add trending links ()
* Add trending links

* Add overriding specific links trendability

* Add link type to preview cards and only trend articles

Change trends review notifications from being sent every 5 minutes to being sent every 2 hours

Change threshold from 5 unique accounts to 15 unique accounts

* Fix tests
2021-11-25 13:07:38 +01:00
Takeshi Umeda
7cb34b32f8
Add management of delivery availability in Federation settings ()
* Add management of delivery availavility in Federation settings

* fix translate

* Remove useless object creation

* Fix DeepSource issue

* Add shortcut for all

* Fix DeepSource(skipcq)

* Change 'remove' to 'clear'

* Fix style

* Change class method name (exhausted_deliveries_key_by)
2021-05-05 23:39:02 +02:00
Eugen Rochko
5e1364c448
Add IP-based rules () 2020-10-12 16:33:49 +02:00
ThibG
89077fb657
Fix admin actions log crash when displaying updates of deleted announcements ()
Fixes 
2020-04-17 19:54:58 +02:00
Eugen Rochko
f65568f1d4
Add ability to filter audit log in admin UI () 2020-04-03 13:06:34 +02:00
ThibG
2423d2f677
Add ability to delete files uploaded for settings in admin UI ()
* Allow deleting site uploads

* Refactor and move links into hints

* Fix i18n tests

* Fix HTML output of site_upload_delete_hint
2020-03-08 16:00:24 +01:00
Eugen Rochko
f52c988e12
Add announcements ()
* Add announcements

Fix 

* Add reactions to announcements

* Add admin UI for announcements

* Add unit tests

* Fix issues

- Add `with_dismissed` param to announcements API
- Fix end date not being formatted when time range is given
- Fix announcement delete causing reactions to send streaming updates
- Fix announcements container growing too wide and mascot too small
- Fix `all_day` being settable when no time range is given
- Change text "Update" to "Announcement"

* Fix scheduler unpublishing announcements before they are due

* Fix filter params not being passed to announcements filter
2020-01-23 22:00:13 +01:00
Eugen Rochko
6feafb8802
Various fixes and improvements ()
* Fix unused role routes being generated

* Remove unused JavaScript code

* Refactor filters code to be DRYer

* Fix `.count == 0` comparisons to `.empty?` in views

* Fix filters in views
2020-01-20 15:55:03 +01:00
ThibG
d8f96028c5 Add ability to filter reports by target account domain ()
* Add ability to filter reports by target account domain

* Reword by_target_domain label
2019-11-30 19:53:58 +01:00
ThibG
a2014830c2 Fix broken admin audit log in whitelist mode () 2019-11-11 00:05:15 +02:00
mayaeh
ef0d22f232 Add search and sort functions to hashtag admin UI ()
* Add search and sort functions to hashtag admin UI

* Move scope processing from tags_controller to tag_filter

* Fix based on method naming conventions

* Fixed not to get 500 errors for invalid requests
2019-09-16 14:27:29 +02:00
Eugen Rochko
115dab78f1
Change admin UI for hashtags and add back whitelisted trends ()
Fix 

Add back the `GET /api/v1/trends` API with the caveat that it does
not return tags that have not been allowed to trend by the staff.

When a hashtag begins to trend (internally) and that hashtag has
not been previously reviewed by the staff, the staff is notified.

The new admin UI for hashtags allows filtering hashtags by where
they are used (e.g. in the profile directory), whether they have
been reviewed or are pending reviewal, they show by how many people
the hashtag is used in the directory, how many people used it
today, how many statuses with it have been created today, and it
allows fixing the name of the hashtag to make it more readable.

The disallowed hashtags feature has been reworked. It is now
controlled from the admin UI for hashtags instead of from
the file `config/settings.yml`
2019-08-05 19:54:29 +02:00
Eugen Rochko
b851456139
Remove Atom feeds and old URLs in the form of GET /:username/updates/:id () 2019-07-07 16:16:51 +02:00
Eugen Rochko
08ec7435ce
Add order options to relationship manager UI () 2019-03-28 02:16:01 +01:00
Eugen Rochko
e117964325
Change icons of features on admin dashboard to remove bias ()
Red crosses implied that it was bad/unexpected that certain features
were not enabled. In reality, they are options, so showing a green
or grey power-off icon is more appropriate.

Add status of timeline preview as well

Fix sample accounts changing too frequently due to wrong query

Sample accounts are intended to be sorted by popularity
2019-03-26 01:24:19 +01:00
Eugen Rochko
b8e4c85e69
Add dormant filter to relationship manager, rename other filters ()
Rename "abandoned" to "moved", and "active" to "primary"
2019-03-18 03:53:17 +01:00
Eugen Rochko
1c113fd72d
Add relationship manager UI () 2019-03-16 11:23:22 +01:00
ysksn
782b622f5f Add specs for action log helper ()
* Add specs for ActionLogHelper

* Make some methods private

methods below never referenced from outside of their module:

- #linkable_log_target
- #log_target_from_history
2019-03-16 00:57:23 +09:00
Eugen Rochko
51e154f5e8
Admission-based registrations mode ()
Fix 
Fix 
2019-03-14 05:28:30 +01:00
ThibG
6840a77711 Add domain search/filter to the "Federation" (/admin/instances) page () 2019-02-18 14:59:19 +01:00
Eugen Rochko
1c6588accc
Redesign admin instances area () 2019-01-08 13:39:49 +01:00
Eugen Rochko
3c033c4352
Add moderation warnings ()
* Add moderation warnings

Replace individual routes for disabling, silencing, and suspending
a user, as well as the report update route, with a unified account
action controller that allows you to select an action (none,
disable, silence, suspend) as well as whether it should generate an
e-mail notification with optional custom text. That notification,
with the optional custom text, is saved as a warning.

Additionally, there are warning presets you can configure to save
time when performing the above.

* Use Account#local_username_and_domain
2018-12-22 20:02:09 +01:00
ThibG
cf6ee4ff24 Add admin ability to remove an user's header image ()
* Fix markup in admin/accounts/:id table for avatar

* Add admin ability to remove an user's header image
2018-12-11 19:28:03 +01:00
Eugen Rochko
73be8f38c1
Add profile directory ()
Fix 
2018-12-06 17:36:11 +01:00
Eugen Rochko
73faadad28
Redesign admin accounts index ()
* Improve overview of accounts in admin UI

- Display suspended status, role, last activity and IP prominently
- Default to showing local accounts
- Default to not showing suspended accounts

* Remove unused strings

* Fix tests

* Allow filtering accounts by IP mask
2018-11-26 15:53:27 +01:00
Eugen Rochko
e645ae9561
Change admin accounts default sort to most recent () 2018-10-04 16:05:38 +02:00
Eugen Rochko
011437dcb5
Group reports by target account ()
* Group reports by target account

* Improve CSS
2018-09-13 03:44:08 +02:00
Eugen Rochko
e926811724
Fix nil error in admin_account_link_to helper ()
Fix 
2018-09-02 19:10:32 +02:00
ThibG
56f882aed6 Avoid deleted attributes when building a Status from action log (fixes ) () 2018-08-22 20:55:50 +02:00
ThibG
106fa28a00 Prevent actions log from crashing when displaying deleted status (fixes ) () 2018-08-16 20:05:26 +02:00
ThibG
0f2fbf7d05 Improvements to toots display in admin view ()
* Distinguish boosts from original statuses in the admin panel (fixes )

* Show the “show more” button in admin view to make CWs clearer (fixes )

* Make content warnings swag
2018-05-12 17:44:15 +02:00
Eugen Rochko
a9c440637c
Improve report layout ()
* Use table for statuses in report

* Display reported account and reporter in the same table

* Split accounts and general report info into two tables again

* Redesign report statuses table, notes, merge notes and action log

* Remove unused translations

* Fix code style issue

* Fix code style issue

* Fix code style issue
2018-04-20 02:28:48 +02:00
Emelia Smith
219a4423d8 Feature: Allow staff to change user emails ()
* Admin: Show unconfirmed email address on account page

* Admin: Allow staff to change user email addresses

* ActionLog: On change_email, log current email address and new unconfirmed email address
2018-04-10 09:16:06 +02:00
Emelia Smith
e85cffb236 Feature: Report improvements () ()
* Implement Assignment of Reports ()

* Change translation of admin.report.comment.label to "Report Comment" for clarity

As we'll soon add the ability for reports to have comments on them, this clarification makes sense.

* Implement notes for Reports

This enables moderators to leave comments about a report whilst they work on it

* Fix display of report moderation notes

* Allow reports to be reopened / marked as unresolved

* Redirect to reports listing upon resolution of report

* Implement "resolve with note" functionality

* Add inverse relationship for report notes

* Remove additional database querying when loading report notes

* Fix tests for reports

* Fix localisations for report notes / reports
2018-04-02 22:04:14 +02:00
Emelia Smith
e7a1716701 Implement the ability for an Administrator or Moderator to remove an account avatar () 2018-04-02 13:45:07 +02:00
Eugen Rochko
02e3e1ec09 Fix nil error in log_target_from_history helper () 2018-01-04 10:56:23 +09:00
Eugen Rochko
ad75ec8b5b
Add filters to admin UI for custom emojis () 2017-12-13 13:28:31 +01:00
Eugen Rochko
20a6584d2d
Clean up admin UI for accounts ()
* Add staff filter to admin UI for accounts, remove obsolete columns

* Only display OStatus section in admin UI for accounts when OStatus data
2017-12-13 12:15:10 +01:00
Yamagishi Kazutoshi
b21db9bbde Using double splat operator () 2017-12-06 11:41:57 +01:00
Yamagishi Kazutoshi
74320971e2 Add invite filter () 2017-12-01 16:40:02 +01:00