diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2021-01-20 23:40:40 +0100 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2021-01-21 00:16:34 +0100 |
commit | f49b8d9b697f098490e81ce0afd889ba37dcb2f3 (patch) | |
tree | 4d9589d1e59af0e1f2763511c902a9ce10a1b39c /client/src/app/shared/shared-main/video/video.model.ts | |
parent | f8aa0154b6638cee878db312918b03332d49e458 (diff) | |
download | PeerTube-f49b8d9b697f098490e81ce0afd889ba37dcb2f3.tar.gz PeerTube-f49b8d9b697f098490e81ce0afd889ba37dcb2f3.tar.zst PeerTube-f49b8d9b697f098490e81ce0afd889ba37dcb2f3.zip |
Allow only admin to download a videogitolite_local/open_instance
Diffstat (limited to 'client/src/app/shared/shared-main/video/video.model.ts')
-rw-r--r-- | client/src/app/shared/shared-main/video/video.model.ts | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/client/src/app/shared/shared-main/video/video.model.ts b/client/src/app/shared/shared-main/video/video.model.ts index d51dfbc6d..fb00c11ff 100644 --- a/client/src/app/shared/shared-main/video/video.model.ts +++ b/client/src/app/shared/shared-main/video/video.model.ts | |||
@@ -179,6 +179,10 @@ export class Video implements VideoServerModel { | |||
179 | return serverConfig.instance.defaultNSFWPolicy !== 'display' | 179 | return serverConfig.instance.defaultNSFWPolicy !== 'display' |
180 | } | 180 | } |
181 | 181 | ||
182 | isDownloadableBy (user: AuthUser) { | ||
183 | return user && this.isLocal === true && user.hasRight(UserRight.SEE_ALL_VIDEOS) | ||
184 | } | ||
185 | |||
182 | isRemovableBy (user: AuthUser) { | 186 | isRemovableBy (user: AuthUser) { |
183 | return user && this.isLocal === true && user.hasRight(UserRight.REMOVE_ANY_VIDEO) | 187 | return user && this.isLocal === true && user.hasRight(UserRight.REMOVE_ANY_VIDEO) |
184 | } | 188 | } |