Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
feat: Profile tab does not depend on isGuest.
damencho9fa29d7353b1
diff --git a/config.js b/config.jsindex 6555e16122..18cbb3a1de 100644--- a/config.js+++ b/config.js@@ -359,6 +359,9 @@ var config = {// Default language for the user interface.// defaultLanguage: 'en',+ // Disables profile and the edit of all fields from the profile settings (display name and email)+ // disableProfile: false,+// If true all users without a token will be considered guests and all users// with token will be considered non-guests. Only guests will be allowed to// edit their profile.diff --git a/modules/UI/videolayout/LocalVideo.js b/modules/UI/videolayout/LocalVideo.jsindex 6d3e727c73..a742689411 100644--- a/modules/UI/videolayout/LocalVideo.js+++ b/modules/UI/videolayout/LocalVideo.js@@ -104,7 +104,7 @@ export default class LocalVideo extends SmallVideo {}this._renderDisplayName({- allowEditing: APP.store.getState()['features/base/jwt'].isGuest,+ allowEditing: !config.disableProfile,displayNameSuffix: interfaceConfig.DEFAULT_LOCAL_DISPLAY_NAME,elementID: 'localDisplayName',participantID: this.iddiff --git a/react/features/base/config/configWhitelist.js b/react/features/base/config/configWhitelist.jsindex ed347b15f4..c29c320252 100644--- a/react/features/base/config/configWhitelist.js+++ b/react/features/base/config/configWhitelist.js@@ -85,6 +85,7 @@ export default ['disableInviteFunctions','disableLocalVideoFlip','disableNS',+ 'disableProfile','disableRemoteControl','disableRemoteMute','disableRtx',diff --git a/react/features/base/jwt/functions.js b/react/features/base/jwt/functions.jsindex 8d8ffc4478..54fe750307 100644--- a/react/features/base/jwt/functions.js+++ b/react/features/base/jwt/functions.js@@ -1,7 +1,5 @@/* @flow */-import jwtDecode from 'jwt-decode';-import { parseURLParams } from '../util';/**@@ -24,7 +22,7 @@ export function parseJWTFromURLParams(url: URL = window.location) {* @returns {string}*/export function getJwtName(state: Object) {- const jwtData = jwtDecode(state['features/base/jwt'].jwt);+ const { user } = state['features/base/jwt'];- return jwtData?.context?.user?.name || '';+ return user?.name || '';}diff --git a/react/features/settings/components/web/SettingsDialog.js b/react/features/settings/components/web/SettingsDialog.jsindex b361da6daa..064335b66b 100644--- a/react/features/settings/components/web/SettingsDialog.js+++ b/react/features/settings/components/web/SettingsDialog.js@@ -126,14 +126,13 @@ class SettingsDialog extends Component<Props> {*/function _mapStateToProps(state) {const configuredTabs = interfaceConfig.SETTINGS_SECTIONS || [];- const jwt = state['features/base/jwt'];// The settings sections to display.const showDeviceSettings = configuredTabs.includes('devices');const moreTabProps = getMoreTabProps(state);const { showModeratorSettings, showLanguageSettings, showPrejoinSettings } = moreTabProps;const showProfileSettings- = configuredTabs.includes('profile') && jwt.isGuest;+ = configuredTabs.includes('profile') && !state['features/base/config'].disableProfile;const showCalendarSettings= configuredTabs.includes('calendar') && isCalendarEnabled(state);const tabs = [];diff --git a/react/features/toolbox/components/web/OverflowMenuProfileItem.js b/react/features/toolbox/components/web/OverflowMenuProfileItem.jsindex 5934926d9d..e6c0e396f3 100644--- a/react/features/toolbox/components/web/OverflowMenuProfileItem.js+++ b/react/features/toolbox/components/web/OverflowMenuProfileItem.js@@ -120,7 +120,7 @@ class OverflowMenuProfileItem extends Component<Props> {function _mapStateToProps(state) {return {_localParticipant: getLocalParticipant(state),- _unclickable: !state['features/base/jwt'].isGuest+ _unclickable: state['features/base/config'].disableProfile|| !interfaceConfig.SETTINGS_SECTIONS.includes('profile')};}diff --git a/react/features/toolbox/components/web/Toolbox.js b/react/features/toolbox/components/web/Toolbox.jsindex 19dd895bb2..b6da5063a7 100644--- a/react/features/toolbox/components/web/Toolbox.js+++ b/react/features/toolbox/components/web/Toolbox.js@@ -129,14 +129,14 @@ type Props = {_fullScreen: boolean,/**- * Whether or not the tile view is enabled.+ * Whether or not the profile is disabled.*/- _tileViewEnabled: boolean,+ _isProfileDisabled: boolean,/**- * Whether or not the current user is logged in through a JWT.+ * Whether or not the tile view is enabled.*/- _isGuest: boolean,+ _tileViewEnabled: boolean,/*** Whether or not the current meeting belongs to a JaaS user.@@ -993,7 +993,7 @@ class Toolbox extends Component<Props, State> {* @returns {boolean}*/_isProfileVisible() {- return this.props._isGuest && this._shouldShowButton('profile');+ return !this.props._isProfileDisabled && this._shouldShowButton('profile');}/**@@ -1448,7 +1448,7 @@ function _mapStateToProps(state) {_desktopSharingDisabledTooltipKey: desktopSharingDisabledTooltipKey,_dialog: Boolean(state['features/base/dialog'].component),_feedbackConfigured: Boolean(callStatsID),- _isGuest: state['features/base/jwt'].isGuest,+ _isProfileDisabled: Boolean(state['features/base/config'].disableProfile),_isVpaasMeeting: isVpaasMeeting(state),_fullScreen: fullScreen,_tileViewEnabled: shouldDisplayTileView(state),