Render template variables manage button based on authorization

Signed-off-by: Jared Scheib <jared.scheib@gmail.com>
pull/10616/head
Alex Paxton 2017-10-24 18:22:56 -07:00 committed by Jared Scheib
parent 4c40055aff
commit 0970629a39
1 changed files with 11 additions and 7 deletions

View File

@ -2,6 +2,8 @@ import React, {PropTypes} from 'react'
import classnames from 'classnames'
import calculateSize from 'calculate-size'
import Authorized, {EDITOR_ROLE} from 'src/auth/Authorized'
import Dropdown from 'shared/components/Dropdown'
const minTempVarDropdownWidth = 146
@ -75,6 +77,7 @@ const TemplateControlBar = ({
This dashboard does not have any Template Variables
</div>}
</div>
<Authorized requiredRole={EDITOR_ROLE}>
<button
className="btn btn-primary btn-sm template-control--manage"
onClick={onOpenTemplateManager}
@ -82,6 +85,7 @@ const TemplateControlBar = ({
<span className="icon cog-thick" />
Manage
</button>
</Authorized>
</div>
</div>