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 | c04f513f9a7cdbb406181e2c3112b3af73a3e249 (patch) | |
tree | 0103c59590e6e8966a7d598851cfbdedf44a5839 /Timeline/ClientApp/src | |
parent | 98f74583c1e903c3b58a45f86626d20190e329df (diff) | |
download | timeline-c04f513f9a7cdbb406181e2c3112b3af73a3e249.tar.gz timeline-c04f513f9a7cdbb406181e2c3112b3af73a3e249.tar.bz2 timeline-c04f513f9a7cdbb406181e2c3112b3af73a3e249.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;
}
}
|