Commit Graph

315 Commits

Author SHA1 Message Date
Chocobozzz
5cf84858d4
Add federation to ownership change 2018-09-04 10:49:53 +02:00
Gaëtan Rizio
74d6346935 Users can change ownership of their video [#510] (#888)
* [#510] Create a new route to get the list of user names

To be able to transfer ownership to a user,
we need to be able to select him from the list of users.

Because the list could be too big, we add a autocomplete feature.

This commit does the following:

* Add a API endpoint to get a list of user names by searching its name

* [#510] The user can choose the next owner of the video

To be able to transfer ownership to a user,
we need the owner to be able to select the user.

The server can autocomplete the name of the user to give the ownership.
We add a dialog for the user to actually select it.

This commit does the following:

* Create a modal for the owner to select the next one
* Opens this modal with a button into the menu *more*
* Make the dependency injection

* [#510] When the user choose the next owner, create a request in database

For the change of ownership to happen, we need to store the temporary requests.
When the user make the request, save it to database.

This commit does the following:

* Create the model to persist change ownership requests
* Add an API to manage ownership operations
* Add a route to persist an ownership request

* [#510] A user can fetch its ownership requests sent to him

To be able to accept or refuse a change of ownership,
the user must be able to fetch them.

This commit does the following:

* Add an API to list ownership for a user
* Add the query to database model

* [#510] A user can validate an ownership requests sent to him - server

The user can accept or refuse any ownership request that was sent to him.
This commit focus only on the server part.

This commit does the following:

* Add an API for the user to accept or refuse a video ownership
* Add validators to ensure security access
* Add a query to load a specific video change ownership request

* [#510] A user can validate an ownership requests sent to him - web

The user can accept or refuse any ownership request that was sent to him.
This commit focus only on the web part.

This commit does the following:

* Add a page to list user ownership changes
* Add actions to accept or refuse them
* When accepting, show a modal requiring the channel to send the video

* Correct lint - to squash

* [#510] PR reviews - to squash

This commit does the following:

* Search parameter for user autocompletion is required from middleware directly

* [#510] PR reviews - to squash with creation in database commit

This commit does the following:

* Add the status attribute in model
* Set this attribute on instance creation
* Use AccountModel method `loadLocalByName`

* [#510] PR reviews - to squash with fetch ownership

This commit does the following:

* Add the scope `FULL` for database queries with includes
* Add classic pagination middlewares

* [#510] PR reviews - to squash with ownership validation - server

This commit does the following:

* Add a middleware to validate whether a user can validate an ownership
* Change the ownership status instead of deleting the row

* [#510] PR reviews - to squash with ownership validation - client

This commit does the following:

* Correct indentation of html files with two-spaces indentation
* Use event emitter instead of function for accept event
* Update the sort of ownership change table for a decreasing order by creation date
* Add the status in ownership change table
* Use classic method syntax

* code style - to squash

* Add new user right - to squash

* Move the change to my-account instead of video-watch - to squash

As requested in pull-request, move the action to change ownership into my videos page.

The rest of the logic was not really changed.

This commit does the following:

- Move the modal into my video page
- Create the generic component `button` to keep some styles and logic

* [#510] Add tests for the new feature

To avoid regression, we add tests for all api of ownership change.

This commit does the following:

- Create an end-to-end test for ownership change
- Divide it to one test per request

* [#510] Do not send twice the same request to avoid spam

We can send several time the same request to change ownership.
However, it will spam the user.
To avoid this, we do not save a request already existing in database.

This commit does the following:

- Check whether the request exist in database
- Add tests to verify this new condition

* [#510] Change icons

Change icons so they remains logic with the rest of the application.

This commit does the following:

- Add svg for missing icons
- Add icons in `my-button` component
- Use these new icons

* [#510] Add control about the user quota

The user should be able to accept a new video only if his quota allows it.

This commit does the following:

- Update the middleware to control the quota
- Add tests verifying the control

* Correct merge

- Use new modal system
- Move button to new directory `buttons`

* PR reviews - to squash
2018-09-04 08:57:13 +02:00
Josh Morel
d9eaee3939 add user account email verificiation (#977)
* add user account email verificiation

includes server and client code to:

* enable verificationRequired via custom config
* send verification email with registration
* ask for verification email
* verify via email
* prevent login if not verified and required
* conditional client links to ask for new verification email

* allow login for verified=null

these are users created when verification not required
should still be able to login when verification is enabled

* refactor email verifcation pr

* change naming from verified to emailVerified
* change naming from askVerifyEmail to askSendVerifyEmail
* undo unrelated automatic prettier formatting on api/config
* use redirectService for home
* remove redundant success notification on email verified

* revert test.yaml smpt host
2018-08-31 09:18:19 +02:00
Chocobozzz
8b60488020
Refractor user quota SQL queries 2018-08-28 18:29:48 +02:00
Felix Ableitner
bee0abffff Implement daily upload limit (#956)
* Implement daily upload limit (ref #652)

* remove duplicate code

* review fixes

* fix tests?

* whitespace fixes, finish leftover todo

* fix tests

* added some new tests

* use different config value for tests

* remove todo
2018-08-28 09:01:35 +02:00
Chocobozzz
f37dc0dd14 Add ability to search video channels 2018-08-27 09:41:54 +02:00
Chocobozzz
8a19bee1a1 Add ability to set a name to a channel 2018-08-27 09:41:54 +02:00
Chocobozzz
965c4b22d0 Use height instead of width to represent the video resolution 2018-08-27 09:41:54 +02:00
Chocobozzz
06a05d5f47 Add subscriptions endpoints to REST API 2018-08-27 09:41:54 +02:00
Chocobozzz
26b7305a23
Add blacklist reason field 2018-08-14 09:27:18 +02:00
Chocobozzz
268eebed92
Add state and moderationComment for abuses on server side 2018-08-10 16:54:01 +02:00
Chocobozzz
eacb25c436
Add reason when banning a user 2018-08-08 17:44:22 +02:00
Chocobozzz
e69219184b
Implement user blocking on server side 2018-08-08 15:22:58 +02:00
Chocobozzz
990b6a0b0c Import torrents with webtorrent 2018-08-08 09:30:31 +02:00
Chocobozzz
ce33919c24 Import magnets with webtorrent 2018-08-08 09:30:31 +02:00
Chocobozzz
3d52b300ea
Merge branch 'release/beta-10' into develop 2018-08-06 12:11:08 +02:00
Chocobozzz
2769e297ca
Fix caption upload on Mac OS 2018-08-06 11:45:24 +02:00
Chocobozzz
b2977eecb8 Fix fps federation 2018-08-06 11:19:16 +02:00
Chocobozzz
299474e827 Add ability to remove a video import 2018-08-06 11:19:16 +02:00
Chocobozzz
fbad87b047 Add ability to import video with youtube-dl 2018-08-06 11:19:16 +02:00
Chocobozzz
cf7a61b5a2
Cleanup req files on bad request 2018-07-31 15:09:34 +02:00
Chocobozzz
2cebd79701
Fix last commit 2018-07-26 11:02:04 +02:00
Rigel Kent
c1e791bad0
expliciting type checks and predicates (server only) 2018-07-25 22:01:25 +02:00
Chocobozzz
0b18f4aa80 Add advanced search in client 2018-07-24 14:04:05 +02:00
Chocobozzz
d525fc399a Add videos list filters 2018-07-24 14:04:05 +02:00
Chocobozzz
f4001cf408
Handle .srt subtitles 2018-07-16 14:31:40 +02:00
Chocobozzz
40e87e9ecc Implement captions/subtitles 2018-07-16 11:50:08 +02:00
Chocobozzz
94831479f5 Migrate to bull 2018-07-11 14:00:17 +02:00
Chocobozzz
3a6f351b25
Handle higher FPS for high resolution (test) 2018-06-29 17:10:54 +02:00
Chocobozzz
0c237b19fd
Fix images size limit 2018-06-22 15:42:55 +02:00
Chocobozzz
575712a5c9
Fix HTTP fallback when having videostream issues on firefox 2018-06-20 08:57:52 +02:00
Chocobozzz
2baea0c77c
Add ability for uploaders to schedule video update 2018-06-14 18:06:56 +02:00
Chocobozzz
bcec136ee6
Fix lint 2018-06-13 14:55:18 +02:00
Chocobozzz
2186386cca
Add concept of video state, and add ability to wait transcoding before
publishing a video
2018-06-12 20:37:51 +02:00
Chocobozzz
28be89161a
Improve create import file job
Fix federation of .ogv videos
2018-06-07 09:43:18 +02:00
Chocobozzz
f6a7c82ca5
Fix AP activity validator 2018-05-29 15:05:14 +02:00
Chocobozzz
ad9e39fb81
Only use account name in routes 2018-05-25 10:41:07 +02:00
Chocobozzz
d14a9532a1
Handle account name in client url
More consistent with AP urls
2018-05-24 15:30:28 +02:00
Chocobozzz
6200d8d917
Fix video channel update with an admin account 2018-05-17 10:55:49 +02:00
Chocobozzz
2efd32f697
Fix updating video tags to empty field 2018-05-16 09:42:56 +02:00
Chocobozzz
938d3fa0ff
Move normalize functions in helpers 2018-05-11 15:55:39 +02:00
Chocobozzz
5cf1350011
Improve AP validation for Notes 2018-05-11 15:41:54 +02:00
Chocobozzz
0f320037e6
Add ability to update a video channel 2018-05-11 15:25:51 +02:00
Chocobozzz
1d6e5dfc37
Improve video torrent AP object validator 2018-05-11 08:48:20 +02:00
Chocobozzz
360329cc02
Account/channel descriptions are not required anymore 2018-05-09 11:41:18 +02:00
Chocobozzz
ed56ad1193
Add ability to update the user display name/description 2018-04-26 10:03:40 +02:00
Chocobozzz
9d3ef9fe05
Use ISO 639 for languages 2018-04-23 14:39:52 +02:00
Chocobozzz
0883b3245b
Add ability to choose what policy we have for NSFW videos
There is a global instance setting and a per user setting
2018-04-19 11:01:34 +02:00
Rigel Kent
244e76a552
feature: initial syndication feeds support
Provides rss 2.0, atom 1.0 and json 1.0 feeds for videos (instance and account-wide) on listings and video-watch views.

* still lacks redis caching
* still lacks lastBuildDate support
* still lacks channel-wide support
* still lacks semantic annotation (for licenses, NSFW warnings, etc.)
* still lacks love ( ˘ ³˘)

* RSS: has MRSS support for torrent lists!
* RSS: includes the first torrent in an enclosure
* JSON: lists all torrents in the 'attachments' object
* ATOM: lacking torrent listing support

Advances #23
Partial implementation for the accountId generation in the client, which will need a hotfix to add a way to get the proper account id.
2018-04-17 01:09:06 +02:00
Chocobozzz
20760d9160
Accept unlisted comments too 2018-04-04 09:59:31 +02:00
Chocobozzz
45cd28b679
Remove alpine image 2018-03-28 13:45:24 +02:00
Chocobozzz
c73e83da28
Truncate correctly video descriptions 2018-03-28 11:00:02 +02:00
Chocobozzz
6be84cbcea
Improve activity pub actors implementation 2018-03-22 18:40:56 +01:00
Chocobozzz
5d00a3d7aa
Update the api documentation 2018-03-19 14:20:04 +01:00
Chocobozzz
ae5a3dd664
Update videos response api 2018-03-19 10:32:51 +01:00
Chocobozzz
f47776e265
Sanitize invalid actor description 2018-03-19 10:32:51 +01:00
Chocobozzz
e8cb44090e
Add links to comment mentions 2018-02-21 16:44:43 +01:00
Chocobozzz
2422c46b27
Implement support field in video and video channel 2018-02-15 15:29:07 +01:00
Chocobozzz
ac81d1a06d
Add ability to set video thumbnail/preview 2018-02-14 16:03:09 +01:00
Chocobozzz
0a67e28bee
Use sensitive instead of nsfw in activitypub 2018-01-26 17:25:35 +01:00
Chocobozzz
7acee6f18a
Fix announce activities 2018-01-26 13:43:34 +01:00
Chocobozzz
66ee325f57
Only accept public comments 2018-01-26 11:20:46 +01:00
Chocobozzz
94a5ff8a4a
Move job queue to redis
We'll use it as cache in the future.

/!\ You'll loose your old jobs (pending jobs too) so upgrade only when
you don't have pending job anymore.
2018-01-25 18:41:17 +01:00
Chocobozzz
9fb3abfdac
Fix communication with mastodon 2018-01-12 15:35:30 +01:00
Chocobozzz
4bbc373f13
Add reject processing for activitypub 2018-01-11 17:45:57 +01:00
Chocobozzz
2ccaeeb341
Fetch remote AP objects 2018-01-10 17:19:14 +01:00
Benjamin Bouvier
57a49263e4 A few updates for the watch video view (#181)
* Fixes #156: Filter out the video being watched from the list of other videos of the same author;

* Fixes #167: in the video view, hide the author's domain when it's from the current host;

* Fixes #171: Allow undoing a like/dislike;
2018-01-07 14:48:10 +01:00
Chocobozzz
2890b615f3
Handle HTML is comments 2018-01-04 17:50:30 +01:00
Chocobozzz
4cb6d45788
Add ability to delete comments 2018-01-04 11:19:16 +01:00
Chocobozzz
cf117aaafc
Add avatar in comments 2018-01-03 17:35:00 +01:00
Chocobozzz
265ba139eb
Send account activitypub update events 2018-01-03 16:38:50 +01:00
Chocobozzz
01de67b9a4
Add avatar max size limit 2018-01-03 11:10:40 +01:00
Chocobozzz
47564bbe2e
Add ability to disable video comments 2018-01-03 10:38:19 +01:00
Chocobozzz
c5911fd347
Begin to add avatar to actors 2017-12-29 19:10:13 +01:00
Chocobozzz
da854ddd50
Propagate old comment on new follow 2017-12-28 11:16:08 +01:00
Chocobozzz
bf1f650817
Add comments controller 2017-12-22 11:29:12 +01:00
Chocobozzz
6d85247028
Create comment on replied mastodon statutes 2017-12-22 09:14:50 +01:00
Chocobozzz
604abfbef5
Fix webfinger validator 2017-12-21 10:16:20 +01:00
Chocobozzz
225a89c2af
Sanitize url to not end with implicit ports 2017-12-21 09:56:59 +01:00
Chocobozzz
57f11c187b
Fix validators issue 2017-12-20 09:05:16 +01:00
Chocobozzz
d7a7c248b3
Handle mastodon shares 2017-12-19 17:07:58 +01:00
Chocobozzz
85414add64
Fix player play exception on chromium 2017-12-19 15:17:43 +01:00
Chocobozzz
232f04c809
Accept domain without port for webfinger 2017-12-19 14:26:32 +01:00
Chocobozzz
e12a009254
Status are sent to mastodon 2017-12-19 10:53:16 +01:00
Chocobozzz
ce33ee01cd
Use RsaSignature2017 2017-12-19 10:53:16 +01:00
Chocobozzz
39fdb3c032
Unfollow with host 2017-12-19 10:53:16 +01:00
Chocobozzz
50d6de9c28
Begin moving video channel to actor 2017-12-19 10:53:16 +01:00
Chocobozzz
fadf619ad6
Save 2017-12-19 10:51:09 +01:00
Andréas Livet
7efe153b0b Enh #106 : Add an autoPlayVideo user attribute (#159)
Warning : I was not able to run the tests on my machine. It uses a different approach to handle databse connexion and didn't find where to configure it...

- create a migration file to add a boolean column in user table
- add autoPlayVideo attribute everywhere it is needed (both on client and server side)
- add tests
- add a way to configure this attribute in account-settings
- use the attribute in video-watch component to actually autoplay or not the video
2017-12-19 10:45:49 +01:00
Chocobozzz
3fd3ab2d34
Move models to typescript-sequelize 2017-12-13 16:50:33 +01:00
Chocobozzz
b1a134ee52
Fix lint 2017-12-08 17:40:54 +01:00
Chocobozzz
f595d39477
Finish admin design 2017-12-08 17:31:21 +01:00
Chocobozzz
a2431b7dcb
Refractor validators 2017-11-27 19:43:01 +01:00
Chocobozzz
4e50b6a1c9
Add shares forward and collection on videos/video channels 2017-11-27 19:40:53 +01:00
Chocobozzz
d4f1e94c89
Misc cleanup 2017-11-27 19:40:53 +01:00
Chocobozzz
8d468a16fd
Cleanup helpers 2017-11-27 19:40:53 +01:00
Chocobozzz
0032ebe94a
Federate likes/dislikes 2017-11-27 19:40:53 +01:00
Chocobozzz
40ff57078e
Federate video views 2017-11-27 19:40:53 +01:00
Chocobozzz
5414139835
Refractor activity pub lib/helpers 2017-11-27 19:40:52 +01:00
Chocobozzz
79d5caf994
Fix lint 2017-11-27 19:40:52 +01:00
Chocobozzz
9a27cdc27c
Optimize signature verification 2017-11-27 19:40:52 +01:00
Chocobozzz
21e0727a84
Federate video abuses 2017-11-27 19:40:52 +01:00
Chocobozzz
20494f1221
Server shares user videos 2017-11-27 19:40:52 +01:00
Chocobozzz
efc32059d9
Send server announce when users upload a video 2017-11-27 19:40:52 +01:00
Chocobozzz
d846501818
Handle announces in inbox 2017-11-27 19:40:52 +01:00
Chocobozzz
8e10cf1a5a
Fix video upload and videos list 2017-11-27 19:40:52 +01:00
Chocobozzz
8e13fa7d09
Add video abuse to activity pub 2017-11-27 19:40:52 +01:00
Chocobozzz
6086242524
Rename Pod -> Server 2017-11-27 19:40:51 +01:00
Chocobozzz
350e31d6b6
Follow works 2017-11-27 19:40:51 +01:00
Chocobozzz
e34c85e527
Fix issues on server start 2017-11-27 19:40:51 +01:00
Chocobozzz
7a7724e66e
Handle follow/accept 2017-11-27 19:40:51 +01:00
Chocobozzz
38fa206583
Remove references to author 2017-11-27 19:40:51 +01:00
Chocobozzz
0d0e8dd090
Continue activitypub 2017-11-27 19:40:51 +01:00
Chocobozzz
e4f97babf7
Begin activitypub 2017-11-27 19:40:51 +01:00
Chocobozzz
563d032e97
Usernames are case insensitive now 2017-11-04 18:32:38 +01:00
Chocobozzz
fd45e8f43c
Add video privacy setting 2017-10-31 11:53:13 +01:00
Chocobozzz
9567011bf0
Add lazy description on server 2017-10-30 10:16:27 +01:00
Chocobozzz
954605a804
Support roles with rights and add moderator role 2017-10-27 16:55:03 +02:00
Chocobozzz
51c443dbe0
Be tolerant with remote requests
Just remove videos we don't want
2017-10-26 10:40:37 +02:00
Chocobozzz
72c7248b6f
Add video channels 2017-10-26 09:11:38 +02:00
Chocobozzz
35bf0c83c8
Video blacklist refractoring 2017-10-10 10:18:16 +02:00
Chocobozzz
14d3270f36
Change how we handle resolution
It was an enum before, now we just use video height
2017-10-09 11:17:36 +02:00
Chocobozzz
b60e5f38da Upgrade express validator to v4 2017-09-15 12:17:08 +02:00
Chocobozzz
fdbda9e3d6 Add tests for npm run scripts 2017-09-07 15:54:34 +02:00
Chocobozzz
b0f9f39ed7 Begin user quota 2017-09-04 20:07:54 +02:00
Chocobozzz
556ddc3192 Upgrade common server dependencies 2017-08-25 18:36:49 +02:00
Chocobozzz
93e1258c7c Move video file metadata in their own table
Will be used for user video quotas and multiple video resolutions
2017-08-25 11:36:23 +02:00
Chocobozzz
075f16caac Remove "function" in favor of () => {} 2017-07-11 17:05:55 +02:00
Chocobozzz
0a6658fdcb Use global uuid instead of remoteId for videos 2017-07-11 16:01:56 +02:00
Chocobozzz
ee9e7b61f5 Create types for model enums 2017-06-16 10:36:18 +02:00
Chocobozzz
1840c2f7c9 Update webpack stack 2017-06-11 15:19:43 +02:00
Chocobozzz
69818c9394 Type functions 2017-06-10 22:15:25 +02:00
Chocobozzz
4d4e5cd4dc require -> import 2017-06-05 21:53:49 +02:00
Chocobozzz
65fcc3119c First typescript iteration 2017-05-20 09:57:40 +02:00
Chocobozzz
c24ac1c18e Fix unset video language on video update 2017-05-05 14:29:58 +02:00
Chocobozzz
3092476e64 Server: add video language attribute 2017-04-07 12:13:37 +02:00
Chocobozzz
1d49e1e27d Server: Add NSFW in user profile 2017-04-03 21:24:36 +02:00
Chocobozzz
31b59b4774 Server: add nsfw attribute 2017-03-28 21:19:46 +02:00
Chocobozzz
6f0c39e2de Server: add licence video attribute 2017-03-27 20:53:11 +02:00
Chocobozzz
e54163c2d5 Relax on tags (accept any characters and not required anymore) 2017-03-22 21:56:02 +01:00
Chocobozzz
6e07c3de88 Add video category support 2017-03-22 21:25:24 +01:00
Chocobozzz
d38b828106 Add like/dislike system for videos 2017-03-08 21:35:43 +01:00
Chocobozzz
e3d156b341 Server: add views attribute when sending videos to friends 2017-03-04 11:00:59 +01:00
Chocobozzz
e4c87ec269 Server: implement video views 2017-02-26 20:01:26 +01:00
Chocobozzz
9e167724f7 Server: make a basic "quick and dirty update" for videos
This system will be useful to to update some int video attributes
(likes, dislikes, views...)

The classic system is not used because we need some optimization for
scaling
2017-02-26 20:01:26 +01:00
Chocobozzz
f6f7dfee01 Server: update express-validator 2017-02-10 11:27:14 +01:00
Chocobozzz
da691c46df Server: remote video validators refractoring 2017-01-17 20:59:16 +01:00
Chocobozzz
b981a525c3 Server: we don't need the video name when removing a remote video 2017-01-04 21:15:57 +01:00
Chocobozzz
55fa55a9be Server: add video abuse support 2017-01-04 21:05:13 +01:00
Chocobozzz
79066fdf33 Server: add updatedAt attribute to videos 2016-12-30 11:45:00 +01:00
Chocobozzz
3d118fb501 Server: propagate video update to other pods 2016-12-30 11:27:42 +01:00
Chocobozzz
4d32448895 Server: use binary data instead of base64 to send thumbnails 2016-12-29 12:13:19 +01:00
Chocobozzz
67bf9b96bb Server: add database field validations 2016-12-28 15:49:23 +01:00
Chocobozzz
feb4bdfd9b First version with PostgreSQL 2016-12-19 21:22:28 +01:00
Chocobozzz
437cf8b531 Server: set manually the post host of a remote video throught the
signature
2016-11-27 11:09:05 +01:00
Chocobozzz
49abbbbedc Pod URL -> pod host. HTTPS is required to make friends.
Reason: in a network with mix http/https pods, https pods won't be able
to play videos from http pod (insecure requests).
2016-11-16 20:29:26 +01:00
Chocobozzz
41b5da1d8c Server: use preview image for opengraph 2016-11-16 20:29:26 +01:00
Chocobozzz
f285faa04e Server: generate magnet uri on the fly 2016-11-16 20:29:26 +01:00
Chocobozzz
558d7c2385 Server: use _id for image and video files. Add remoteId field 2016-11-16 20:29:26 +01:00
Chocobozzz
c4403b29ad Server: remove useless hash affectations 2016-10-02 12:19:02 +02:00
Chocobozzz
d57d6f2605 Server: fix makefriends validation and tests 2016-08-21 10:41:04 +02:00
Chocobozzz
6c1a098b41 Server: fix remote videos requests validator 2016-08-21 09:54:46 +02:00
Chocobozzz
1e2564d392 Server: make friends urls come from the request instead of the
configuration file
2016-08-20 17:11:38 +02:00
Chocobozzz
9bd2662976 Implement user API (create, update, remove, list) 2016-08-04 22:33:38 +02:00
Chocobozzz
e4c556196d Server: reorganize express validators 2016-07-31 20:58:43 +02:00