Commit Graph

64 Commits

Author SHA1 Message Date
Chocobozzz
96f29c0f6d
Optimize SQL requests of videos AP endpoints 2018-09-19 10:20:38 +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
99492dbc0d Add get subscription endpoint 2018-08-27 09:41:54 +02:00
Chocobozzz
06215f15e0
Cleanup utils helper 2018-08-14 15:28:30 +02:00
Chocobozzz
191764f30b
Improve blacklist management 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
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
57c36b277e Begin advanced search 2018-07-24 14:04:05 +02:00
Chocobozzz
019e475072
Remove unnecessary image check in video upload 2018-07-16 16:51:17 +02:00
Chocobozzz
a920fef10a
Refractor video attr validators 2018-07-16 14:58:22 +02:00
Chocobozzz
40e87e9ecc Implement captions/subtitles 2018-07-16 11:50:08 +02:00
Chocobozzz
0c237b19fd
Fix images size limit 2018-06-22 15:42:55 +02:00
Chocobozzz
e94fc29706
Fix removing scheduled update 2018-06-18 10:26:20 +02:00
Chocobozzz
bbe0f0645c
Add ability to schedule video publication 2018-06-15 18:20:56 +02:00
Chocobozzz
2baea0c77c
Add ability for uploaders to schedule video update 2018-06-14 18:06:56 +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
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
0f320037e6
Add ability to update a video channel 2018-05-11 15:25:51 +02:00
Chocobozzz
360329cc02
Account/channel descriptions are not required anymore 2018-05-09 11:41:18 +02:00
Chocobozzz
d5b7d9110d
Fix error logging 2018-03-26 16:04:14 +02:00
Chocobozzz
6221f311de
Add ability to update another user video 2018-02-22 09:03:45 +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
81ebea48bf
Don't leak unlisted videos 2018-01-31 14:40:42 +01:00
Chocobozzz
4cb6d45788
Add ability to delete comments 2018-01-04 11:19:16 +01:00
Chocobozzz
47564bbe2e
Add ability to disable video comments 2018-01-03 10:38:19 +01:00
Chocobozzz
da854ddd50
Propagate old comment on new follow 2017-12-28 11:16:08 +01:00
Chocobozzz
3fd3ab2d34
Move models to typescript-sequelize 2017-12-13 16:50:33 +01:00
Chocobozzz
8e7f08b5a5
Make some fields optional when uploading a video 2017-12-07 17:05:23 +01:00
Chocobozzz
f3aaa9a95c
Fix client search 2017-12-05 18:25:29 +01:00
Chocobozzz
98ec8b8e73
Fix lint 2017-11-30 13:16:23 +01:00
Chocobozzz
c60774b05b
Remove max duration/filesize constraints 2017-11-28 14:51:00 +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
8d468a16fd
Cleanup helpers 2017-11-27 19:40:53 +01:00
Chocobozzz
6086242524
Rename Pod -> Server 2017-11-27 19:40:51 +01:00
Chocobozzz
38fa206583
Remove references to author 2017-11-27 19:40:51 +01:00
Chocobozzz
11474c3cd9
Add tests and fix bugs for video privacy 2017-10-31 15:32:10 +01:00
Chocobozzz
fd45e8f43c
Add video privacy setting 2017-10-31 11:53:13 +01:00
Chocobozzz
954605a804
Support roles with rights and add moderator role 2017-10-27 16:55:03 +02:00
Chocobozzz
d412e80e5f
Fix lint 2017-10-26 09:11:38 +02:00
Chocobozzz
72c7248b6f
Add video channels 2017-10-26 09:11:38 +02:00
Chocobozzz
10db166bbe
Upgrade client dependencies and fix error logs 2017-10-19 10:22:07 +02:00
Ronan
8376734ee3 Handle express-validator error on the client side and fix #96 (#98)
* Handle express-validator error on the client side

* More meaningfull error for not supported format
2017-10-16 11:43:40 +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
bfb3a98fac Remove ng2 file upload module
Unmaintained and we don't need it anymore with httpclient
2017-09-14 17:25:36 +02:00