Render Dashboard rename based on Authorization
Signed-off-by: Alex Paxton <thealexpaxton@gmail.com>pull/10616/head
parent
c4c423ad76
commit
4c40055aff
|
@ -48,13 +48,22 @@ const DashboardHeader = ({
|
||||||
/>
|
/>
|
||||||
: null}
|
: null}
|
||||||
{dashboard
|
{dashboard
|
||||||
? <DashboardHeaderEdit
|
? <Authorized
|
||||||
|
requiredRole={EDITOR_ROLE}
|
||||||
|
replaceWith={
|
||||||
|
<h1 className="page-header__title">
|
||||||
|
{activeDashboard}
|
||||||
|
</h1>
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<DashboardHeaderEdit
|
||||||
onSave={onSave}
|
onSave={onSave}
|
||||||
onCancel={onCancel}
|
onCancel={onCancel}
|
||||||
activeDashboard={activeDashboard}
|
activeDashboard={activeDashboard}
|
||||||
onEditDashboard={onEditDashboard}
|
onEditDashboard={onEditDashboard}
|
||||||
isEditMode={isEditMode}
|
isEditMode={isEditMode}
|
||||||
/>
|
/>
|
||||||
|
</Authorized>
|
||||||
: <h1 className="page-header__title">
|
: <h1 className="page-header__title">
|
||||||
{activeDashboard}
|
{activeDashboard}
|
||||||
</h1>}
|
</h1>}
|
||||||
|
|
Loading…
Reference in New Issue