Hides sip dialout button if configured to show it for non guest users.
This commit is contained in:
parent
c8ab1b9892
commit
32ea2161eb
|
@ -227,10 +227,15 @@ export function showSharedVideoButton(): Function {
|
||||||
export function showSIPCallButton(show: boolean): Function {
|
export function showSIPCallButton(show: boolean): Function {
|
||||||
return (dispatch: Dispatch<*>) => {
|
return (dispatch: Dispatch<*>) => {
|
||||||
const buttonName = 'sip';
|
const buttonName = 'sip';
|
||||||
|
|
||||||
|
// hide the button if there is a config to check for user roles,
|
||||||
|
// based on the token and the the user is guest
|
||||||
const shouldShow
|
const shouldShow
|
||||||
= APP.conference.sipGatewayEnabled()
|
= APP.conference.sipGatewayEnabled()
|
||||||
&& UIUtil.isButtonEnabled(buttonName)
|
&& UIUtil.isButtonEnabled(buttonName)
|
||||||
&& show;
|
&& show
|
||||||
|
&& (!config.enableUserRolesBasedOnToken
|
||||||
|
|| !APP.tokenData.isGuest);
|
||||||
|
|
||||||
if (shouldShow) {
|
if (shouldShow) {
|
||||||
dispatch(setToolbarButton(buttonName, {
|
dispatch(setToolbarButton(buttonName, {
|
||||||
|
|
Loading…
Reference in New Issue