change(ui): permission check for service accountts
This commit is contained in:
parent
04e8b199f5
commit
7c7a93d64e
6 changed files with 6 additions and 6 deletions
|
|
@ -25,5 +25,5 @@ const Cont = connect((state: any) => ({
|
|||
}))(Assist);
|
||||
|
||||
export default withPageTitle('Assist - OpenReplay')(
|
||||
withPermissions(['ASSIST_LIVE'])(withRouter(Cont))
|
||||
withPermissions(['ASSIST_LIVE', 'SERVICE_ASSIST_LIVE'])(withRouter(Cont))
|
||||
);
|
||||
|
|
|
|||
|
|
@ -292,7 +292,7 @@ function AssistActions({
|
|||
const con = connect((state: any) => {
|
||||
const permissions = state.getIn(['user', 'account', 'permissions']) || [];
|
||||
return {
|
||||
hasPermission: permissions.includes('ASSIST_CALL'),
|
||||
hasPermission: permissions.includes('ASSIST_CALL') || permissions.includes('SERVICE_ASSIST_CALL'),
|
||||
isEnterprise: state.getIn(['user', 'account', 'edition']) === 'ee',
|
||||
userDisplayName: state.getIn(['sessions', 'current']).userDisplayName,
|
||||
agentId: state.getIn(['user', 'account', 'id'])
|
||||
|
|
|
|||
|
|
@ -286,7 +286,7 @@ export default connect(
|
|||
const permissions = state.getIn(['user', 'account', 'permissions']) || [];
|
||||
const isEnterprise = state.getIn(['user', 'account', 'edition']) === 'ee';
|
||||
return {
|
||||
disableDevtools: isEnterprise && !permissions.includes('DEV_TOOLS'),
|
||||
disableDevtools: isEnterprise && !(permissions.includes('DEV_TOOLS') || permissions.includes('SERVICE_DEV_TOOLS')),
|
||||
fullscreen: state.getIn(['components', 'player', 'fullscreen']),
|
||||
bottomBlock: state.getIn(['components', 'player', 'bottomBlock']),
|
||||
showStorageRedux: !state.getIn([
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ function Session({
|
|||
}
|
||||
|
||||
export default withPermissions(
|
||||
['SESSION_REPLAY'],
|
||||
['SESSION_REPLAY', 'SERVICE_SESSION_REPLAY'],
|
||||
'',
|
||||
true
|
||||
)(
|
||||
|
|
|
|||
|
|
@ -432,7 +432,7 @@ export default connect(
|
|||
const permissions = state.getIn(['user', 'account', 'permissions']) || [];
|
||||
const isEnterprise = state.getIn(['user', 'account', 'edition']) === 'ee';
|
||||
return {
|
||||
disableDevtools: isEnterprise && !permissions.includes('DEV_TOOLS'),
|
||||
disableDevtools: isEnterprise && !(permissions.includes('DEV_TOOLS') || permissions.includes('SERVICE_DEV_TOOLS')),
|
||||
fullscreen: state.getIn(['components', 'player', 'fullscreen']),
|
||||
bottomBlock: state.getIn(['components', 'player', 'bottomBlock']),
|
||||
showStorageRedux: !state.getIn([
|
||||
|
|
|
|||
|
|
@ -186,7 +186,7 @@ function LiveSessionList(props: Props) {
|
|||
);
|
||||
}
|
||||
|
||||
export default withPermissions(['ASSIST_LIVE'])(
|
||||
export default withPermissions(['ASSIST_LIVE', 'SERVICE_ASSIST_LIVE'])(
|
||||
connect(
|
||||
(state: any) => ({
|
||||
list: state.getIn(['liveSearch', 'list']),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue