Commit Graph

129 Commits

Author SHA1 Message Date
32ad5dbd74
[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-08-14 17:00:46 +01:00
a4cb90ba12
[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-08-14 16:12:58 +01:00
c804892672
[TEST] Raise test coverage for UserPanel to 100% 2021-08-14 16:12:57 +01:00
e053ee451b
[CONTROLLER][UserPanel] Finish implementation of ::notifications so it actually saves the values in the database 2021-08-14 16:12:57 +01:00
9a6fddb004
[CONTROLLR][UserPanel][PLUGINS] Add submit button to notification settings for each transport 2021-08-14 16:12:57 +01:00
06b9bd9910
[CONTROLLER][AdminPanel] Further ensure form validity 2021-08-14 16:12:56 +01:00
c38bbed7df
[UTIL][FormFields] Move FormFields class to Util\Form namespace 2021-08-14 16:12:54 +01:00
1da1f0918e
[TESTS] Raise test coverage for AdminPanel to 100% 2021-08-04 20:11:47 +00:00
b075ab610b
[SECURITY] Do not require email when in development 2021-08-04 17:48:00 +01:00
960675b459
[TESTS] Raise test coverage for AdminPanel controller to 100% 2021-08-03 19:37:56 +00:00
f9c1d14c7a
[TESTS] Raise test coverage for Attachment controller to 100% 2021-08-03 19:37:56 +00:00
b2456d8cd2
[TESTS] Raise test coverage for Controller/Security to 100% 2021-08-03 19:23:02 +00:00
af951685ed
[TESTS] Add coverage ignore to TemplateController and ResetPassword (as it requires sending emails) 2021-08-03 19:23:02 +00:00
9c61e92257
[CONTROLLER][Attachment] Assert that the supplied is positive and add documentation 2021-08-03 19:23:02 +00:00
a83d506d6c
[UTIL] Add a class that defines commonly used form fields 2021-08-03 19:22:54 +00:00
56481c8289
[CORE] Add passowrd reset and forgot password functionality 2021-08-03 19:22:54 +00:00
bdbd588de9
[CORE][SECURITY][EMAIL] Move email confirmation functionality to it's own static wrapper, in preparation for adding password reset functionality 2021-08-03 19:22:54 +00:00
176d604abb
[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-08-03 19:22:54 +00:00
d34155c743
[CONFIG] Make password length limits configurable 2021-08-03 19:13:29 +00:00
780d341939 [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-08-03 19:02:39 +01:00
832a5c0bd9 [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-07-22 21:10:45 +01:00
eecef99372 [TESTS] Raise test coverage for App\Controller\Network to 100% and fixup related code 2021-05-23 19:56:45 +00:00
84399a76e3 [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-05-05 12:46:08 +00:00
2e943293e6 [ATTACHMENTS] Do not create thumbnails for attachments with mimetype different from 'image|video' 2021-05-02 00:50:16 +01:00
af4b0113ba [ATTACHMENTS] Respect config for smart crop 2021-05-02 00:00:03 +01:00
c2f6665cce [AttachmentShowRelated] Move Attachment related to plugin 2021-04-30 23:08:08 +01:00
ec0c551bb3 [AVATAR] Move avatar settings page to Avatar component 2021-04-29 18:14:49 +00:00
55c4ad40cd [ENTITY][GSActor] Fix getAvatarUrl method 2021-04-29 17:42:06 +01:00
bb56b24d8f [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-04-28 21:53:02 +00:00
f264cd6125 [ATTACHMENTS] Add controller and templates for the attachment show page, which shows extra info about an attachment, such as related notes and tags 2021-04-28 21:25:35 +00:00
6da8cf7f14 [ATTACHMENTS] Add event 'AttachmentFileInfo' to allow a plugin to override the file displayed 2021-04-28 15:01:40 +00:00
b82658e345 [SECURITY][DB] Make user register 'atomic', by using a single transaction for inserting all objects, to avoid partial inserts 2021-04-23 12:54:25 +00:00
9814baf192 [UI] Use thumbnail path for thumbs 2021-04-19 13:22:50 +01:00
5ec7717fa1 [ATTACHMENTS] Move thumbnail controller to core and cleanup 2021-04-19 13:22:50 +01:00
2f137f8b44 [ATTACHMENTS] Even more further refactoring
Introduce Encoder plugins Instead of abstract upload and thumb modules

Ported attachment routes. In v3 thumbnail depends on existing attachment
so route updated accordingly.
2021-04-19 13:22:04 +01:00
0f52638a80 [ATTACHMENTS] Further refactoring
Some key points:
- Components and Plugins shouldn't extend Module directly
- Avatars should be fetched via GSActor ID, not by nickname as that isn't unique
- Avatar now is a separate Component
- Common file utilities are now to be placed in Core\GSFile, this will
  handle storage and trigger validation
- Some bug fixes
2021-04-19 13:21:32 +01:00
b639ce906c [MEDIA] Rename File to Attachment 2021-04-16 20:28:39 +01:00
d6414e51a2 [CORE] Rename NoteScope to VisibilityScope, as it will be used for attachment visbility too 2021-04-16 20:28:39 +01:00
6bfea8a0df [NETWORK] Fix big brain bug 2021-04-14 19:54:38 +00:00
d0fd0e6c6c [DB] Remove unique constraint from GSActor.nickname and fix register and related functionality 2021-04-14 15:37:24 +00:00
637c25d5fe [WEB] Fix translations and small inconsistency when opening on web 2021-04-14 15:37:24 +00:00
Daniel
04b9c736a6 [REVERSEFAV] Added reverse favorourites stream/template 2021-04-14 15:37:23 +00:00
João Brandão
5e26359783 [UI][TIMELINES] Refactored query for public stream 2021-04-14 15:37:23 +00:00
Angelo D. Moura
66875e93f8 [Directory] Finished implementing groups stream using Directory plugin 2021-04-14 15:37:23 +00:00
Angelo D. Moura
08fe5fb23f [Directory] Changed the route so the plugin Directory doesn't take over - query is not working for some reason 2021-04-14 15:37:23 +00:00
Angelo D. Moura
d4038cd520 [Directory] Added the route, controller and a blank template file - something is broken 2021-04-14 15:37:23 +00:00
Angelo D. Moura
f29b15924c [Directory] Actors are now organized by nickname 2021-04-14 15:37:23 +00:00
Angelo D. Moura
f621e521f9 [Directory] Actors are no longer related with notes, and the logged in user now shows on the stream 2021-04-14 15:37:23 +00:00
Angelo D. Moura
f67c41a7ac [Directory] Almost finishied creating the /actors stream - problems with the css files 2021-04-14 15:37:23 +00:00
Angelo D. Moura
19be786da8 [Directory] Add the route, controller function, and blank template file 2021-04-14 15:37:23 +00:00