浏览代码

Hides sip dialout button if configured to show it for non guest users.

j8
damencho 8 年前
父节点
当前提交
32ea2161eb
共有 1 个文件被更改,包括 6 次插入1 次删除
  1. 6
    1
      react/features/toolbox/actions.web.js

+ 6
- 1
react/features/toolbox/actions.web.js 查看文件

227
 export function showSIPCallButton(show: boolean): Function {
227
 export function showSIPCallButton(show: boolean): Function {
228
     return (dispatch: Dispatch<*>) => {
228
     return (dispatch: Dispatch<*>) => {
229
         const buttonName = 'sip';
229
         const buttonName = 'sip';
230
+
231
+        // hide the button if there is a config to check for user roles,
232
+        // based on the token and the the user is guest
230
         const shouldShow
233
         const shouldShow
231
             = APP.conference.sipGatewayEnabled()
234
             = APP.conference.sipGatewayEnabled()
232
                 && UIUtil.isButtonEnabled(buttonName)
235
                 && UIUtil.isButtonEnabled(buttonName)
233
-                && show;
236
+                && show
237
+                && (!config.enableUserRolesBasedOnToken
238
+                        || !APP.tokenData.isGuest);
234
 
239
 
235
         if (shouldShow) {
240
         if (shouldShow) {
236
             dispatch(setToolbarButton(buttonName, {
241
             dispatch(setToolbarButton(buttonName, {

正在加载...
取消
保存