Commit Graph

179 Commits (dddf58c8ce58f6cdd4b8ba93690cceae8f52c37d)

Author SHA1 Message Date
Chocobozzz 709756b8e1 Async signature and various fixes 2017-07-07 18:23:18 +02:00
Chocobozzz 6fcd19ba73 Move to promises
Closes https://github.com/Chocobozzz/PeerTube/issues/74
2017-07-05 14:14:16 +02:00
Chocobozzz ba44fa1953 Move ensureRegistrationEnabled to middlewares 2017-06-25 17:48:51 +02:00
Chocobozzz 69f616ab3a Use shared models 2017-06-11 11:02:35 +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 e02643f32e Type models 2017-05-25 17:32:16 +02:00
Chocobozzz 65fcc3119c First typescript iteration 2017-05-20 09:57:40 +02:00
Chocobozzz 5a976a8c35 Server: move requests lib in their own directory 2017-05-05 17:35:58 +02:00
Chocobozzz ab683a8e0d Format video blacklist 2017-04-26 21:42:36 +02:00
Green-Star 198b205c10 Add ability for an administrator to remove any video (#61)
* Add ability for an admin to remove every video on the pod.

* Server: add BlacklistedVideos relation.

* Server: Insert in BlacklistedVideos relation upon deletion of a video.

* Server: Modify BlacklistedVideos schema to add Pod id information.

* Server: Moving insertion of a blacklisted video from the `afterDestroy` hook into the process of deletion of a video.

To avoid inserting a video when it is removed on its origin pod.
When a video is removed on its origin pod, the `afterDestroy` hook is fire, but no request is made on the delete('/:videoId') interface.
Hence, we insert into `BlacklistedVideos` only on request on delete('/:videoId') (if requirements for insertion are met).

* Server: Add removeVideoFromBlacklist hook on deletion of a video.

We are going to proceed in another way :).
We will add a new route : /:videoId/blacklist to blacklist a video.
We do not blacklist a video upon its deletion now (to distinguish a video blacklist from a regular video delete)
When we blacklist a video, the video remains in the DB, so we don't have any concern about its update. It just doesn't appear in the video list.
When we remove a video, we then have to remove it from the blacklist too.
We could also remove a video from the blacklist to 'unremove' it and make it appear again in the video list (will be another feature).

* Server: Add handler for new route post(/:videoId/blacklist)

* Client: Add isBlacklistable method

* Client: Update isRemovableBy method.

* Client: Move 'Delete video' feature from the video-list to the video-watch module.

* Server: Exclude blacklisted videos from the video list

* Server: Use findAll() in BlacklistedVideos.list() method

* Server: Fix addVideoToBlacklist function.

* Client: Add blacklist feature.

* Server: Use JavaScript Standard Style.

* Server: In checkUserCanDeleteVideo, move the callback call inside the db callback function

* Server: Modify BlacklistVideo relation

* Server: Modifiy Videos methods.

* Server: Add checkVideoIsBlacklistable method

* Server: Rewrite addVideoToBlacklist method

* Server: Fix checkVideoIsBlacklistable method

* Server: Add return to addVideoToBlacklist method
2017-04-26 21:22:10 +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 9c2c18f3ab Server: little sort refractoring 2017-02-26 20:01:26 +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 ad4a8a1cca Add email to users 2017-02-18 09:29:59 +01:00
Chocobozzz 4793c343fd Add email to pods 2017-02-16 19:19:56 +01:00
Chocobozzz f6f7dfee01 Server: update express-validator 2017-02-10 11:27:14 +01:00
Chocobozzz b09ce6455f Server: error if we add a pod that already exists 2017-01-27 11:55:31 +01:00
Chocobozzz 63d00f5ded Server: fix update right checks 2017-01-11 19:15:23 +01:00
Chocobozzz 45abb8b97b Server: rights check for update a video 2017-01-11 18:41:09 +01:00
Chocobozzz bdfbd4f162 Server: use crypto instead of ursa for pod signature 2017-01-04 22:23:07 +01:00
Chocobozzz 55fa55a9be Server: add video abuse support 2017-01-04 21:05:13 +01:00
Chocobozzz 8fd66b75bf Server: fix video remoe validation 2016-12-30 12:39:49 +01:00
Chocobozzz 818f7987eb Server: optimization for videoGet and videoRemove 2016-12-30 11:51:08 +01:00
Chocobozzz 7b1f49de22 Server: add ability to update a video 2016-12-29 19:07:05 +01:00
Chocobozzz 4ff0d86208 Server: little refractoring 2016-12-29 18:02:03 +01:00
Chocobozzz feb4bdfd9b First version with PostgreSQL 2016-12-19 21:22:28 +01:00
Chocobozzz 38d78e5b82 Server: remove encryption when seending requests to other pods
We don't need it anymore since HTTPS is mandatory now
2016-11-27 18:25:35 +01:00
Chocobozzz 441b66f809 Server: forbid to make friends with a non https server 2016-11-16 20:29:26 +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 af1068ce1d Server: forbid to remove the root user 2016-10-07 15:32:09 +02:00
Chocobozzz c4403b29ad Server: remove useless hash affectations 2016-10-02 12:19:02 +02:00
Chocobozzz 1ab844d859 Server: add port when making friends if it is not specified 2016-10-01 14:23:50 +02:00
Chocobozzz 0eb78d5303 Server: do not forget to check the signature when another pod wants to
quit us
2016-10-01 09:09:07 +02:00
Chocobozzz f9b2d2cedd Fix client peer dependencies 2016-09-20 22:45:14 +02:00
Chocobozzz bf68dd752d Client: fix error display for component 2016-08-23 17:42:56 +02:00
Chocobozzz 39f87cb216 Server: catch JSON.parse exceptions 2016-08-23 14:37:36 +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 5c39adb731 Server: add user list sort/pagination 2016-08-16 22:31:45 +02:00
Chocobozzz 68a3b9f2aa Server: delete user with the id and not the username 2016-08-09 21:44:45 +02:00
Chocobozzz 58b2ba55a9 Server: do not allow a user to remove a video of another user 2016-08-05 21:41:28 +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
Chocobozzz 2f372a8654 Server: implement refresh token 2016-07-20 16:23:58 +02:00
Chocobozzz 5f698b82c7 Use dashes for filenames 2016-07-01 16:22:36 +02:00
Chocobozzz fc51fde048 reqValidators --> validators 2016-07-01 16:16:40 +02:00
Chocobozzz 69b0a27cbb OAuth/User models refractoring -> use mongoose api 2016-07-01 16:03:53 +02:00
Chocobozzz a3ee6fa22d Pod model refractoring -> use mongoose api 2016-06-30 22:39:08 +02:00
Chocobozzz aaf61f3810 Video model refractoring -> use mongoose api 2016-06-24 17:42:51 +02:00
Chocobozzz 528a9efa82 Try to make a better communication (between pods) module 2016-06-18 16:13:54 +02:00
Chocobozzz e822fdaeee Use ng2-file-upload instead of jquery and add tags support to the video
upload form
2016-06-07 22:34:02 +02:00
Chocobozzz be587647f9 Add tags support to server 2016-06-06 14:15:03 +02:00
Chocobozzz 1cdb5c0f58 Handle error for the video upload 2016-06-04 20:37:38 +02:00
Chocobozzz 46246b5f19 Extends the search feature by customizing the search field (name,
podUrl...)
2016-05-22 09:15:00 +02:00
Chocobozzz 501bc6c2b1 Thumbnail, author and duration support in client 2016-05-21 18:08:23 +02:00
Chocobozzz 13c14a9028 Add radix to parseInt 2016-05-19 20:27:36 +02:00
Chocobozzz a877d5acc5 Add ability to sort videos list 2016-05-17 21:03:00 +02:00
Chocobozzz 67100f1f97 Add a check for the duration of videos 2016-05-16 19:49:10 +02:00
Chocobozzz 3fe81fa75e Move the count of results for the pagination in constants module 2016-05-13 20:10:02 +02:00
Chocobozzz fbf1134e3e Introduce paginations in videos listing 2016-05-13 18:10:46 +02:00
Chocobozzz b3b9264742 Authenticate before make/quit friends (server + tests) 2016-05-13 16:31:14 +02:00
Chocobozzz 5dda52c924 Remove the cache middleware 2016-05-13 16:13:00 +02:00
Chocobozzz bc503c2a62 Update to standard 7. Goodbye snake_case, I used to love you 2016-05-13 14:23:11 +02:00
Chocobozzz 0c1cbbfe29 Add authentications for routes that need it and adapts the tests 2016-04-14 22:06:11 +02:00
Chocobozzz 9457bf8807 OAuth server: first draft 2016-03-21 11:56:33 +01:00
Chocobozzz a4c1575197 Use map instead of pluck (lodash) 2016-03-18 16:34:50 +01:00
Chocobozzz 2df82d42cb Change api output for videos 2016-03-18 16:28:09 +01:00
Chocobozzz f0f5567b69 Use const/let now we use node 4.2 2016-03-16 22:29:27 +01:00
Chocobozzz 5101105ef9 Video lib/model/reqvalidator refractoring 2016-03-16 21:37:17 +01:00
Chocobozzz b9a3e09ad5 Prepare folders structure for angular app 2016-03-07 11:33:59 +01:00