Commit Graph

250 Commits

Author SHA1 Message Date
marcin mikołajczak bb0b17f4d9 Include following/followers in backups
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-03-10 23:53:12 +01:00
Mark Felder 10f3a2833f Pleroma.User.Query: fix dialyzer error
lib/pleroma/user/query.ex:74:unknown_type
Unknown type: Query.t/0.
2024-01-22 18:37:13 -05:00
Mark Felder 1361856213 Pleroma.User.Backup: fix some dialyzer errors
lib/pleroma/user/backup.ex:207:call
The function call will not succeed.

:zip.create(
  string(),
  [:"\"actor.json\"", :"\"outbox.json\"", :"\"likes.json\"", :"\"bookmarks.json\""],
  [{:cwd, binary()}, ...]
)

will never return since the success typing is:
(
  atom() | [atom() | [any()] | char()],
  [
    atom()
    | [atom() | [any()] | char()]
    | {atom() | [atom() | [any()] | char()], binary()}
    | {atom() | [atom() | [any()] | char()], binary(),
       {:file_info, :undefined | non_neg_integer(),
        :device | :directory | :other | :regular | :symlink | :undefined,
        :none | :read | :read_write | :undefined | :write,
        :undefined | non_neg_integer() | {_, _}, :undefined | non_neg_integer() | {_, _},
        :undefined | non_neg_integer() | {_, _}, :undefined | non_neg_integer(),
        :undefined | non_neg_integer(), :undefined | non_neg_integer(),
        :undefined | non_neg_integer(), :undefined | non_neg_integer(),
        :undefined | non_neg_integer(), :undefined | non_neg_integer()}}
  ],
  [
    :cooked
    | :memory
    | :verbose
    | {:comment, string()}
    | {:compress, :all | [[any()]] | {:add, [any()]} | {:del, [any()]}}
    | {:cwd, string()}
    | {:uncompress, :all | [[any()]] | {:add, [any()]} | {:del, [any()]}}
  ]
) ::
  {:error, _}
  | {:ok,
     atom() | [atom() | [any()] | char()] | {atom() | [atom() | [any()] | char()], binary()}}

and the contract is
(name, fileList, options) :: retValue
when name: :file.name(),
     fileList: [:FileSpec],
     fileSpec:
       :file.name() | {:file.name(), binary()} | {:file.name(), binary(), :file.file_info()},
     options: [:Option],
     option: create_option(),
     retValue:
       {:ok, FileName :: filename()}
       | {:ok, {FileName :: filename(), binary()}}
       | {:error, Reason :: term()}
2024-01-22 18:37:13 -05:00
marcin mikołajczak 017e35fbf1 Fix some more typos
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2023-12-28 00:17:04 +01:00
Mark Felder 9896b64f54 Elixir 1.15: Chase the Logger.warn deprecation 2023-12-20 20:16:26 +00:00
Lain Soykaf 06fc196772 Backup: Fix config 2023-12-10 19:46:25 +04:00
Lain Soykaf c068a218ea Backup Tests: Split out async tests, use mox. 2023-12-10 18:57:46 +04:00
tusooa 179efd9467
Make backup parameters configurable 2022-12-24 00:20:25 -05:00
tusooa 7d3e4eaeb9
Log errors more extensively 2022-12-24 00:04:51 -05:00
tusooa 46ab97d721
Simplify backup update clause 2022-12-24 00:04:50 -05:00
tusooa e4ac2a7cd6
Detail backup states 2022-12-24 00:04:32 -05:00
Sean King 60df2d8a97
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into fine_grained_moderation_privileges 2022-12-18 22:03:48 -07:00
a1batross 7f63b4c315 User: search: exclude deactivated users from user search
This way we don't pollute search results with deactivated and deleted users
2022-09-16 00:49:16 +03:00
Ilja 34adea8d28 Add Pleroma.User.all_users_with_privilege/1
This should eventually replace the Pleroma.User.all_superusers/0 function

* I added a new param `is_privileged` in User.query
* Now we can fetch all users with a specified privilege
2022-06-21 12:10:27 +02:00
Tusooa Zhu 221cb3fb81
Allow users to create backups without providing email address
Ref: backup-without-email
2022-05-07 00:23:55 -04:00
Sean King 17aa3644be
Copyright bump for 2022 2022-02-25 23:11:42 -07:00
marcin mikołajczak 0266bc3c96 Birthdays: hide_birthday -> show_birthday
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-01-23 09:13:33 +01:00
Alex Gleason 66e8c6f90f
Birthdays: birth_date --> birthday 2022-01-22 13:21:55 -06:00
marcin mikołajczak dfb2808535 Birth dates: Add tests
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-01-18 23:15:31 +01:00
marcin mikołajczak b108b05650 Birth dates, birthday reminders API, allow instance admins to require minimum age
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-01-18 14:57:48 +01:00
marcin mikołajczak de006443f0 MastoAPI: Profile directory 2021-12-26 02:35:17 +00:00
Alex Gleason 437c1a5a52
v2 Suggestions: actually flter out dismissed suggestions 2021-11-26 21:09:37 -06:00
Alex Gleason b17360cd7c
v2 Suggestions: rudimentary API response 2021-11-26 14:34:10 -06:00
Alex Gleason d87dfcb5f0
Put custom guards in Web.Utils.Guards
Speeds up recompilation by removing a compile-time cycle on AdminAPI.Search
2021-06-07 15:51:52 -05:00
Mark Felder 537ba1c5e0 Merge branch 'develop' into refactor/deactivated_user_field 2021-01-25 09:45:06 -06:00
Mark Felder e759579f97 Active users must be confirmed 2021-01-19 16:39:55 -06:00
Mark Felder 28581e03ad Merge branch 'develop' into refactor/deactivated_user_field 2021-01-18 14:58:21 -06:00
Mark Felder 44a86951a3 Merge branch 'develop' into refactor/approval_pending_user_field 2021-01-18 12:05:05 -06:00
Mark Felder d36182c088 Change user.confirmation_pending field to user.is_confirmed 2021-01-15 12:44:41 -06:00
Mark Felder cd1e5d76ab Remove User.restrict_deactivated/1
Everything else is in User.Query, no need for this odd kludge.
2021-01-15 11:24:46 -06:00
Mark Felder 860b5c7804 Change user.deactivated field to user.is_active 2021-01-15 11:24:46 -06:00
Mark Felder f7e59c28ed Change user.approval_pending field to user.is_approved 2021-01-15 10:42:02 -06:00
Haelwenn (lanodan) Monnier c4439c630f
Bump Copyright to 2021
grep -rl '# Copyright © .* Pleroma' * | xargs sed -i 's;Copyright © .* Pleroma .*;Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>;'
2021-01-13 07:49:50 +01:00
Egor Kislitsyn 35ba48494f
Stream follow updates 2020-12-02 00:18:58 +04:00
Ivan Tashkinov e164c37139 [#2301] Proper handling of `User.is_discoverable`: users appear in in-service search but are hidden from external services like search bots. 2020-11-19 19:30:02 +03:00
Ivan Tashkinov fcad3e716a [#2301] Quick fix: users with is_discoverable == false (default!) are included in search results. 2020-11-19 18:08:22 +03:00
Egor Kislitsyn d2113428c0
Merge remote-tracking branch 'origin/develop' into feature/account-export 2020-10-30 19:34:02 +04:00
Maksim Pechnikov 60663150b5 admin user search: added filter by `actor_type` 2020-10-22 11:53:28 +03:00
Maksim Pechnikov 46b420aa60 need_confirmed -> unconfirmed 2020-10-22 11:50:49 +03:00
Maksim Pechnikov 9ef46ce410 added 'unconfirmed' filter to admin/users 2020-10-22 11:50:49 +03:00
Egor Kislitsyn e87901c424
Merge remote-tracking branch 'origin/develop' into feature/account-export 2020-10-20 17:27:29 +04:00
Egor Kislitsyn ad605e3e16
Rename `Pleroma.Backup` to `Pleroma.User.Backup` 2020-10-20 17:16:58 +04:00
Mark Felder 8bacdc3680 Change user.discoverable field to user.is_discoverable 2020-10-13 09:45:08 -05:00
lain 90fee49c52 User search: Once again, change uri handling.
They can indeed be non-unique.
2020-09-30 14:14:41 +02:00
feld 1672d8b37c Merge branch 'feature/bulk-confirmation' into 'develop'
Bulk account confirmation actions

Closes #2085

See merge request pleroma/pleroma!2975
2020-09-25 16:15:01 +00:00
lain 05b5241314 Linter fixes 2020-09-25 09:12:48 +02:00
lain a8c17ea25a User Search: Also find user by uri 2020-09-25 08:46:14 +02:00
lain d0078bc404 User Search: Boost resolved results and exact ap_id matches. 2020-09-24 15:54:55 +02:00
Mark Felder f3a1f9c3bb Merge branch 'develop' into feature/bulk-confirmation 2020-09-23 11:56:22 -05:00
Egor Kislitsyn 0e0ece251a
Filter out internal users by default 2020-09-22 16:56:11 +04:00