From 22e909224c023c10699fce5c8b9db4be2cd049d7 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 18 Mar 2022 16:31:12 +0100 Subject: Don't allow video edition if not enabled --- client/src/app/+my-library/my-videos/my-videos.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'client/src/app/+my-library/my-videos/my-videos.component.ts') diff --git a/client/src/app/+my-library/my-videos/my-videos.component.ts b/client/src/app/+my-library/my-videos/my-videos.component.ts index c998b7c49..45a586981 100644 --- a/client/src/app/+my-library/my-videos/my-videos.component.ts +++ b/client/src/app/+my-library/my-videos/my-videos.component.ts @@ -9,7 +9,7 @@ import { AdvancedInputFilter } from '@app/shared/shared-forms' import { DropdownAction, Video, VideoService } from '@app/shared/shared-main' import { LiveStreamInformationComponent } from '@app/shared/shared-video-live' import { MiniatureDisplayOptions, SelectionType, VideosSelectionComponent } from '@app/shared/shared-video-miniature' -import { VideoChannel, VideoSortField, VideoState } from '@shared/models' +import { VideoChannel, VideoSortField } from '@shared/models' import { VideoChangeOwnershipComponent } from './modals/video-change-ownership.component' @Component({ @@ -207,7 +207,7 @@ export class MyVideosComponent implements OnInit, DisableForReuseHook { { label: $localize`Editor`, linkBuilder: ({ video }) => [ '/video-editor/edit', video.uuid ], - isDisplayed: ({ video }) => video.state.id === VideoState.PUBLISHED, + isDisplayed: ({ video }) => video.isEditableBy(this.authService.getUser(), this.serverService.getHTMLConfig().videoEditor.enabled), iconName: 'film' }, { -- cgit v1.2.3