Commit Graph

300 Commits (07b1a18aa678d260009a93e36606c5c5f585723d)

Author SHA1 Message Date
Chocobozzz 07b1a18aa6 Add playlist check param tests 2019-03-18 11:17:59 +01:00
Chocobozzz 418d092afa Playlist server API 2019-03-18 11:17:59 +01:00
Chocobozzz 539d3f4faa
BREAKING: update CSP configuration
Disable it by default and add ability to specify a custom report uri
2019-02-21 16:28:53 +01:00
Josh Morel 576ad67aac check email enabled for requiresEmailVer config 2019-02-18 17:21:41 +01:00
Chocobozzz c74c9be934
Refractor published date on video import 2019-02-12 11:47:23 +01:00
Chocobozzz b718fd2237
Merge branch 'develop' into pr/1285 2019-02-11 14:09:23 +01:00
Chocobozzz 88108880bb
Merge branch 'develop' into pr/1217 2019-02-11 11:52:34 +01:00
Chocobozzz b426edd485
Cleanup reset user password by admin
And add some tests
2019-02-11 10:37:27 +01:00
Chocobozzz 0920929696 Add hls support on server 2019-02-11 09:13:02 +01:00
Chocobozzz 2adfc7ea9a Refractor videojs player
Add fake p2p-media-loader plugin
2019-02-11 09:13:02 +01:00
clementbrizard 1e74f19a21 Enable video upload and edit 2019-01-12 13:45:23 +00:00
Chocobozzz 5abb9fbbd1
Add ability to unfederate a local video (on blacklist) 2019-01-10 15:39:51 +01:00
Chocobozzz d3e56c0c4b
Implement contact form in the client 2019-01-10 11:32:38 +01:00
Chocobozzz a4101923e6
Implement contact form on server side 2019-01-10 11:32:37 +01:00
Chocobozzz 2f1548fda3 Add notifications in the client 2019-01-09 11:15:15 +01:00
Chocobozzz dc13348070 Add import finished and video published notifs 2019-01-09 11:15:15 +01:00
Chocobozzz cef534ed53 Add user notification base code 2019-01-09 11:15:15 +01:00
Chocobozzz 1a12adcd1e
Fix users update me param validation 2018-12-18 17:18:25 +01:00
Chocobozzz 8b9a525a18
Add history on server side
Add ability to disable, clear and list user videos history
2018-12-18 11:35:50 +01:00
Chocobozzz 8fc58cb580
Fix CSP on dev mode 2018-12-17 09:42:28 +01:00
Rigel Kent 5e755fff9d add Content Security Policy (#1252)
* add Content Security Policy

* remove reflect-metadata on production builds to get rid of unsafe-eval

* fix baseCSP usage

* add SRI to CSP

* add blob: to media-src

* remove SRI

* CSP set to reportOnly

* adding data: to connect-src CSP

* remove block-all-mixed-content

* add report-uri support
2018-12-13 09:49:45 +01:00
Josh Morel fc2ec87a8c enable email verification by admin (#1348)
* enable email verification by admin

* rename/label to set email as verified

to be more explicit that admin is not sending
another email to confirm

* add update user emailVerified check-params test

* make user.model emailVerified property required
2018-11-21 08:48:29 +01:00
Chocobozzz 8d4273463f
Check follow constraints when getting a video 2018-11-16 15:49:16 +01:00
Chocobozzz 8d1fa36ad2
Do not host remote AP objects 2018-11-16 11:18:13 +01:00
Chocobozzz 7373507fa8
Improve video upload error handling 2018-11-16 10:05:25 +01:00
Chocobozzz 5c6d985fae
Check activities host 2018-11-14 16:32:27 +01:00
Chocobozzz df66d81583
Add compatibility with other Linked Signature algorithms 2018-11-14 16:32:27 +01:00
Chocobozzz 41f2ebae4f
Add HTTP signature check before linked signature
It's faster, and will allow us to use RSA signature 2018 (with upstream
jsonld-signature module) without too much incompatibilities in the
peertube federation
2018-10-19 12:26:37 +02:00
Chocobozzz b44164bb56 Add ability to mute a user/instance by server in server api 2018-10-16 16:41:36 +02:00
Chocobozzz af5767ffae Add user/instance block by users in the client 2018-10-16 16:41:36 +02:00
Chocobozzz 7ad9b9846c Add ability for users to block an account/instance on server side 2018-10-16 16:41:36 +02:00
Chocobozzz 1cd3facc3d
Add ability to list all local videos
Including private/unlisted for moderators/admins
2018-10-10 11:46:50 +02:00
Lucas Declercq 9ccff23877 Add explicit error message that changing video ownership only works with local accounts (#1214)
* Add explicit error message that changing video ownership only works with local accounts

* Remove superfluous logger

* Remove unneeded end() to error responses

* Add a message on client side to prevent transfering ownership to a remote account
2018-10-10 08:57:00 +02:00
Lucas Declercq 7f2cfe3a79 Rename downloadingEnabled property to downloadEnabled 2018-10-08 14:45:22 +02:00
Lucas Declercq 156c50af30 Add downloadingEnabled property to video model 2018-10-06 19:17:39 +02:00
Chocobozzz 6e46de095d
Add user history and resume videos 2018-10-05 11:22:38 +02:00
Chocobozzz 601527d795
Check video channel name is unique on our instance 2018-10-01 15:20:14 +02:00
Chocobozzz 46f8d69b4e
Fix redundancy with videos already duplicated with another instance 2018-10-01 09:41:48 +02:00
Chocobozzz a890d1e0d3
Check current password on server side 2018-09-26 16:28:27 +02:00
Chocobozzz 4157cdb137
Refractor videos AP functions 2018-09-19 11:16:23 +02:00
Chocobozzz 96f29c0f6d
Optimize SQL requests of videos AP endpoints 2018-09-19 10:20:38 +02:00
Chocobozzz 627621c1e8
Optimize SQL requests of watch page API endpoints 2018-09-19 09:54:37 +02:00
Chocobozzz c48e82b5e0 Basic video redundancy implementation 2018-09-13 14:05:49 +02:00
Chocobozzz 662fb3ab5e
Fix feeds with channel filter 2018-09-13 09:48:34 +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
Chocobozzz 328e607d32
Add sql trace in error log on sequelize error 2018-08-31 11:43:46 +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
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 c907c2fa3f
Improve error message on actor name conflict 2018-08-27 16:42:27 +02:00
Chocobozzz f37dc0dd14 Add ability to search video channels 2018-08-27 09:41:54 +02:00