From c04f513f9a7cdbb406181e2c3112b3af73a3e249 Mon Sep 17 00:00:00 2001 From: crupest Date: Wed, 5 Aug 2020 23:37:21 +0800 Subject: Fix hasReadPermission bug. --- Timeline/ClientApp/src/app/data/timeline.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Timeline/ClientApp/src') diff --git a/Timeline/ClientApp/src/app/data/timeline.ts b/Timeline/ClientApp/src/app/data/timeline.ts index 22b10ca8..508363a4 100644 --- a/Timeline/ClientApp/src/app/data/timeline.ts +++ b/Timeline/ClientApp/src/app/data/timeline.ts @@ -781,7 +781,11 @@ export class TimelineService { } else if (visibility === 'Register') { if (user != null) return true; } else if (visibility === 'Private') { - if (user != null && this.isMemberOf(user.username, timeline)) { + if ( + user != null && + (user.username === timeline.owner.username || + this.isMemberOf(user.username, timeline)) + ) { return true; } } -- cgit v1.2.3