fix(ui) - assist check for session permissions
This commit is contained in:
parent
0f83d77fb6
commit
945256ab40
2 changed files with 2 additions and 2 deletions
|
|
@ -78,7 +78,7 @@ function LiveSessionList(props: Props) {
|
|||
)
|
||||
}
|
||||
|
||||
export default withPermissions(['ASSIST_LIVE'])(connect(
|
||||
export default withPermissions(['ASSIST_LIVE', 'SESSION_REPLAY'])(connect(
|
||||
(state) => ({
|
||||
list: state.getIn(['sessions', 'liveSessions']),
|
||||
loading: state.getIn([ 'sessions', 'loading' ]),
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ export default (requiredPermissions, className, backLink = '') => BaseComponent
|
|||
}))
|
||||
class extends React.PureComponent {
|
||||
render() {
|
||||
const hasPermission = this.props.permissions.some(permission => requiredPermissions.includes(permission));
|
||||
const hasPermission = requiredPermissions.every(permission => this.props.permissions.includes(permission));
|
||||
|
||||
return !this.props.isEnterprise || hasPermission ? <BaseComponent {...this.props} /> : <div className={className}><NoPermission backLink={backLink} /></div>
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue