diff options
author | Jenny Yu <jennyyu212@outlook.com> | 2022-06-13 09:19:24 -0700 |
---|---|---|
committer | Jenny Yu <jennyyu212@outlook.com> | 2022-06-13 09:19:24 -0700 |
commit | 576e5d1832349ffcf6d64367fa0c35f96e222fe4 (patch) | |
tree | 92ae8af72cb26871851a0f23649e9a8e4d4af6c5 /src | |
parent | 95d0f3f9b341020c742cf0df8402a564cc7c5dec (diff) |
fix: separation between my dashboard and shared dashboards
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/DashboardView.tsx | 5 | ||||
-rw-r--r-- | src/client/views/topbar/TopBar.tsx | 4 |
2 files changed, 4 insertions, 5 deletions
diff --git a/src/client/views/DashboardView.tsx b/src/client/views/DashboardView.tsx index e48c1bde1..5aacec61f 100644 --- a/src/client/views/DashboardView.tsx +++ b/src/client/views/DashboardView.tsx @@ -42,10 +42,9 @@ export class DashboardView extends React.Component { getDashboards = () => { const allDashboards = DocListCast(CurrentUserUtils.MyDashboards.data); if (this.selectedDashboardGroup === DashboardGroup.MyDashboards) { - return allDashboards.filter((dashboard) => dashboard.author === Doc.CurrentUserEmail) + return allDashboards.filter((dashboard) => Doc.GetProto(dashboard).author === Doc.CurrentUserEmail) } else { - allDashboards.map(d => console.log(d.author)) - return allDashboards.filter((dashboard) => dashboard.author !== Doc.CurrentUserEmail) + return allDashboards.filter((dashboard) => Doc.GetProto(dashboard).author !== Doc.CurrentUserEmail) } } diff --git a/src/client/views/topbar/TopBar.tsx b/src/client/views/topbar/TopBar.tsx index 214fe1dbf..7ff7063cd 100644 --- a/src/client/views/topbar/TopBar.tsx +++ b/src/client/views/topbar/TopBar.tsx @@ -69,8 +69,8 @@ export class TopBar extends React.Component { {CurrentUserUtils.ActiveDashboard ? <div className="topbar-button-text" onClick={() => {SharingManager.Instance.open(undefined, activeDashboard)}}> {/* TODO: if I have edit access to the dashboard, display share if this is a shared dashboard, display "view original or view annotated" */} - { Doc.GetProto(CurrentUserUtils.ActiveDashboard)?.author === Doc.CurrentUserEmail ? "Share": "view original" } - {/* { GetEffectiveAcl(Doc) === AclAdmin ? "Share": "view original" } */} + {/* { Doc.GetProto(CurrentUserUtils.ActiveDashboard)?.author === Doc.CurrentUserEmail ? "Share": "view original" } */} + { GetEffectiveAcl(Doc.GetProto(CurrentUserUtils.ActiveDashboard)) === AclAdmin ? "Share": "view original" } </div> : (null)} <div className="topbar-button-icon" onClick={() => window.open( "https://brown-dash.github.io/Dash-Documentation/", "_blank")}> |