diff options
author | crupest <crupest@outlook.com> | 2020-08-05 23:37:21 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2020-08-05 23:37:21 +0800 |
commit | f235e3c601399fb4300d44b2406fe6744a16eccd (patch) | |
tree | f07365f0fcc0cdb55d051cc93baee286c024b913 /Timeline/ClientApp/src | |
parent | c8c290e7f7e56d422cacacef1a069ded676c3d9b (diff) | |
download | timeline-f235e3c601399fb4300d44b2406fe6744a16eccd.tar.gz timeline-f235e3c601399fb4300d44b2406fe6744a16eccd.tar.bz2 timeline-f235e3c601399fb4300d44b2406fe6744a16eccd.zip |
Fix hasReadPermission bug.
Diffstat (limited to 'Timeline/ClientApp/src')
-rw-r--r-- | Timeline/ClientApp/src/app/data/timeline.ts | 6 |
1 files changed, 5 insertions, 1 deletions
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;
}
}
|