Diogo Peralta Cordeiro
05f16a3084
[ENTITY][AttachmentThumbnail] Now thumbnails are always only available in three sizes: small, medium, big
...
Commit jointly produced with eli (Eliseu Amaro)
Breaking change: Entity changed to only store the tinyint referring to the size stored
With this, the logic was simplified and now it's not possible to make an
instance produce unnecessary thumbs. The aspect ratio is preserved and
thus the thumbs will always look nice. New configuration was added to
maintain flexibility.
2021-09-22 15:13:46 +01:00
Diogo Peralta Cordeiro
941cbe6599
[Actor] Refactor GSActor into Actor
2021-09-18 05:12:17 +01:00
Diogo Peralta Cordeiro
d6f31d102a
[CORE][ActivityStreamsTwo][ActivityPub] Set all routes
...
Allow global routes to act for every actor
Fix Favoured stream query
2021-09-18 05:12:15 +01:00
Eliseu Amaro
26af284353
[CONTROLLER][SECURITY] Registration feedback. The flashError works. However, Symfony's Exception error page is viewed upon trying to register.
2021-09-15 14:48:06 +01:00
Diogo Peralta Cordeiro
365edbaff0
[ActivityStreamsTwo] Initial Actor support
...
Various bug fixes
2021-09-15 10:26:53 +01:00
Hugo Sales
4e30e5aad9
[TOOLS] Fix all issues found by PHPStan level 2
2021-09-14 13:13:44 +01:00
Hugo Sales
add8f4a52f
[TOOLS] Fix all errors found by PHPStan level 1
2021-09-14 13:13:42 +01:00
Hugo Sales
eb833b62e2
[TOOLS] Fix all level 0 errors found by PHPStan and move constant definition to bootstrap file
2021-09-14 13:13:42 +01:00
Hugo Sales
4916c8cbda
[CONTROLLER][AdminPanel] Add missing Exception import
2021-09-14 13:13:41 +01:00
Diogo Peralta Cordeiro
e4aa3ae968
[NOTE] Add route and controller
2021-09-14 13:13:37 +01:00
Diogo Peralta Cordeiro
2a3db65216
[CONTROLLER][Attachment] Some attachments may not have dimensions
2021-09-14 13:13:34 +01:00
Hugo Sales
458b6d0009
[UI] Rename all forms to more specific names, to avoid form name collisions
2021-09-14 13:13:33 +01:00
Hugo Sales
6799052ff5
[ATTACHMENTS] Ensure thumbnail dimensions are bounded and change way cropping is implemented
2021-09-14 13:13:32 +01:00
Hugo Sales
e2e6c7a5bf
[TESTS] Hot-fix Security controller tests, broken with ongoing form rendering changes
2021-09-14 13:13:30 +01:00
Eliseu Amaro
87d7318de5
[CONTROLLER][SECURITY] Added class names. Help labels for each form element. Each form element now has a proper block prefix (the resulting HTML won't simply concatenate the form's name to the element's label).
2021-09-14 13:13:30 +01:00
Hugo Sales
3843348c1b
[CONTROLLER][Attachment] Small refactor and add testing annotation
2021-09-14 13:13:28 +01:00
Diogo Peralta Cordeiro
968e3431e1
[Attachment] Sometimes we can't provide download of original file
2021-09-14 13:13:26 +01:00
Diogo Peralta Cordeiro
3f61537140
[ENTITY] Split Attachment in various new entities
...
Remove Attachment Scope
Fixed some minor bugs
Scope will be implemented later in v3. It doesn't make sense to have
the scope handling being per attachment. Different actors can post
the same attachment with different scopes. The attachment controller
will assume the highest level of scope applied to the attachment and
the rest will be handled at the note level.
Motivation:
* Remove title from attachment, as it's part of the relation between attachment and note.
* Remove actor from attachment, many actors may publish the same attachment.
* Remove is_local from attachment, as it's part of the relation between attachment and note.
* Remove remote_url from attachment, different urls can return the same attachment.
Addition:
* Attachment now has a lives attribute, it's a reference counter with a nicer name
* GSActorToAttachment
* GSActorToRemoteURL
* RemoteURL
* RemoteURLToNote
* RemoteURLToAttachment
* AttachmentToNote now has a title attribute
2021-09-14 13:13:24 +01:00
Hugo Sales
061a85d6b3
[EVENTS] Change FormatNoteList do separate in and out arguments
...
This is necessary due to some weird problem which I wasn't able to figure out (but which doesn't matter)
that somehow causes the event to be called twice during testing, and thus the function was exploding
2021-09-14 13:13:23 +01:00
Hugo Sales
b5de80303a
[TEST] Raise test coverage for UserPanel to 100%
2021-09-14 13:13:23 +01:00
Hugo Sales
480665afc8
[CONTROLLER][UserPanel] Finish implementation of ::notifications so it actually saves the values in the database
2021-09-14 13:13:23 +01:00
Hugo Sales
cdf3426567
[CONTROLLR][UserPanel][PLUGINS] Add submit button to notification settings for each transport
2021-09-14 13:13:23 +01:00
Hugo Sales
afbcb179b2
[CONTROLLER][AdminPanel] Further ensure form validity
2021-09-14 13:13:23 +01:00
Hugo Sales
1b623a85ae
[UTIL][FormFields] Move FormFields class to Util\Form namespace
2021-09-14 13:13:22 +01:00
Hugo Sales
0ae67d96ea
[TESTS] Raise test coverage for AdminPanel to 100%
2021-09-14 13:13:19 +01:00
Diogo Peralta Cordeiro
b77e35ef09
[SECURITY] Do not require email when in development
2021-09-14 13:13:19 +01:00
Hugo Sales
fe7c2b5115
[TESTS] Raise test coverage for AdminPanel controller to 100%
2021-09-14 13:13:19 +01:00
Hugo Sales
e0a0df502e
[TESTS] Raise test coverage for Attachment controller to 100%
2021-09-14 13:13:19 +01:00
Hugo Sales
dfc97d2607
[TESTS] Raise test coverage for Controller/Security to 100%
2021-09-14 13:13:18 +01:00
Hugo Sales
8139a21eb9
[TESTS] Add coverage ignore to TemplateController and ResetPassword (as it requires sending emails)
2021-09-14 13:13:18 +01:00
Hugo Sales
518995d155
[CONTROLLER][Attachment] Assert that the supplied is positive and add documentation
2021-09-14 13:13:17 +01:00
Hugo Sales
0c54a3297f
[UTIL] Add a class that defines commonly used form fields
2021-09-14 13:13:17 +01:00
Hugo Sales
ccd5ebf8e4
[CORE] Add passowrd reset and forgot password functionality
2021-09-14 13:13:17 +01:00
Hugo Sales
769fff2448
[CORE][SECURITY][EMAIL] Move email confirmation functionality to it's own static wrapper, in preparation for adding password reset functionality
2021-09-14 13:13:17 +01:00
Hugo Sales
e27823ae6c
[CONTROLLER][Security] Refactor and make clearer errors with duplicate nicknames and emails. Return notes as a callable, since they're not used in the default template, in the login and register pages
2021-09-14 13:13:17 +01:00
Hugo Sales
1c09aefd5a
[CONFIG] Make password length limits configurable
2021-09-14 13:13:14 +01:00
Eliseu Amaro
6dd0292397
[SETTINGS][ROUTES][CONTROLLER] Settings overhaul, refactoring to accommodate new global settings view. WIP, component settings aren't shown at the moment.
...
Signed-off-by: Eliseu Amaro <mail@eliseuama.ro>
2021-09-14 13:13:12 +01:00
Diogo Peralta Cordeiro
861732176e
[Media] Support any kind of thumbnails in the Core
...
Sanitize Attachments instead of Validate (part 1)
Ensure the intended filetypes and mimetypes during Vips conversions (part 1)
Various bug fixes
2021-09-14 13:13:03 +01:00
Hugo Sales
74f477489b
[TESTS] Raise test coverage for App\Controller\Network to 100% and fixup related code
2021-09-14 13:13:02 +01:00
Hugo Sales
bd249b508b
[ENTITY] Add 'normalized_nickname' to GSActor, the result of Nickname::normalize, so we can make sure we don't have very similar nicknames duplicated
2021-09-14 13:12:59 +01:00
Diogo Peralta Cordeiro
091f4b5194
[ATTACHMENTS] Do not create thumbnails for attachments with mimetype different from 'image|video'
2021-09-14 13:12:57 +01:00
Diogo Peralta Cordeiro
adb6680a01
[ATTACHMENTS] Respect config for smart crop
2021-09-14 13:12:57 +01:00
Diogo Peralta Cordeiro
8cb64ede7f
[AttachmentShowRelated] Move Attachment related to plugin
2021-09-14 13:12:55 +01:00
Hugo Sales
2ec7059076
[AVATAR] Move avatar settings page to Avatar component
2021-09-14 13:12:53 +01:00
Diogo Peralta Cordeiro
88e5cec8fc
[ENTITY][GSActor] Fix getAvatarUrl method
2021-09-14 13:12:53 +01:00
Hugo Sales
aea8639d44
[ATTACHMENTS] Restrict thumbnail generation to allowed sizes. Defaults to only configured sizes, but can be extended with the event 'GetAllowedThumbnailSizes'. The intention is to prevent DoS attacks, since handling a thumbnail request is a relatively slow process
2021-09-14 13:12:53 +01:00
Hugo Sales
436528172c
[ATTACHMENTS] Add controller and templates for the attachment show page, which shows extra info about an attachment, such as related notes and tags
2021-09-14 13:12:53 +01:00
Hugo Sales
2adb3c3521
[ATTACHMENTS] Add event 'AttachmentFileInfo' to allow a plugin to override the file displayed
2021-09-14 13:12:52 +01:00
Hugo Sales
7a90e844b7
[SECURITY][DB] Make user register 'atomic', by using a single transaction for inserting all objects, to avoid partial inserts
2021-09-14 13:12:23 +01:00
Diogo Peralta Cordeiro
3afa872cec
[UI] Use thumbnail path for thumbs
2021-09-14 13:12:22 +01:00