From 32ea2161eb883c2d2e87341b4682e653ab32f304 Mon Sep 17 00:00:00 2001 From: damencho Date: Mon, 17 Apr 2017 16:40:21 -0500 Subject: [PATCH] Hides sip dialout button if configured to show it for non guest users. --- react/features/toolbox/actions.web.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/react/features/toolbox/actions.web.js b/react/features/toolbox/actions.web.js index efcb1d40f..fbf7608a8 100644 --- a/react/features/toolbox/actions.web.js +++ b/react/features/toolbox/actions.web.js @@ -227,10 +227,15 @@ export function showSharedVideoButton(): Function { export function showSIPCallButton(show: boolean): Function { return (dispatch: Dispatch<*>) => { 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 = APP.conference.sipGatewayEnabled() && UIUtil.isButtonEnabled(buttonName) - && show; + && show + && (!config.enableUserRolesBasedOnToken + || !APP.tokenData.isGuest); if (shouldShow) { dispatch(setToolbarButton(buttonName, {