From 7871681448d3a9daae6c0b942f15128ee88209f3 Mon Sep 17 00:00:00 2001 From: Oleksandr Zhurbenko Date: Tue, 9 Jan 2018 14:28:48 -0800 Subject: [PATCH] Changed all the references of kick to remove, to be consistent --- .../imports/api/users/server/methods.js | 6 +++--- .../server/methods/{kickUser.js => removeUser.js} | 2 +- .../imports/ui/components/app/container.jsx | 10 +++++----- .../imports/ui/components/user-list/component.jsx | 4 ++-- .../imports/ui/components/user-list/container.jsx | 8 ++++---- .../imports/ui/components/user-list/service.js | 12 ++++++------ .../user-list/user-list-content/component.jsx | 4 ++-- .../user-participants/component.jsx | 14 +++++++------- .../user-participants/user-list-item/component.jsx | 6 +++--- .../private/config/settings-development.json | 2 +- .../private/config/settings-production.json | 2 +- bigbluebutton-html5/private/locales/en.json | 4 ++-- 12 files changed, 37 insertions(+), 37 deletions(-) rename bigbluebutton-html5/imports/api/users/server/methods/{kickUser.js => removeUser.js} (91%) diff --git a/bigbluebutton-html5/imports/api/users/server/methods.js b/bigbluebutton-html5/imports/api/users/server/methods.js index 4aa61b73a8..0e20f98f4b 100644 --- a/bigbluebutton-html5/imports/api/users/server/methods.js +++ b/bigbluebutton-html5/imports/api/users/server/methods.js @@ -5,15 +5,15 @@ import validateAuthToken from './methods/validateAuthToken'; import setEmojiStatus from './methods/setEmojiStatus'; import assignPresenter from './methods/assignPresenter'; import changeRole from './methods/changeRole'; -import kickUser from './methods/kickUser'; +import removeUser from './methods/removeUser'; Meteor.methods(mapToAcl(['methods.userLogout', 'methods.setEmojiStatus', 'methods.assignPresenter', 'methods.changeRole', - 'methods.kickUser'], { + 'methods.removeUser'], { userLogout, setEmojiStatus, assignPresenter, changeRole, - kickUser, + removeUser, })); Meteor.methods({ validateAuthToken, }); diff --git a/bigbluebutton-html5/imports/api/users/server/methods/kickUser.js b/bigbluebutton-html5/imports/api/users/server/methods/removeUser.js similarity index 91% rename from bigbluebutton-html5/imports/api/users/server/methods/kickUser.js rename to bigbluebutton-html5/imports/api/users/server/methods/removeUser.js index 645f68f012..80d90ec221 100644 --- a/bigbluebutton-html5/imports/api/users/server/methods/kickUser.js +++ b/bigbluebutton-html5/imports/api/users/server/methods/removeUser.js @@ -2,7 +2,7 @@ import { Meteor } from 'meteor/meteor'; import { check } from 'meteor/check'; import RedisPubSub from '/imports/startup/server/redis'; -export default function kickUser(credentials, userId) { +export default function removeUser(credentials, userId) { const REDIS_CONFIG = Meteor.settings.private.redis; const CHANNEL = REDIS_CONFIG.channels.toAkkaApps; const EVENT_NAME = 'EjectUserFromMeetingCmdMsg'; diff --git a/bigbluebutton-html5/imports/ui/components/app/container.jsx b/bigbluebutton-html5/imports/ui/components/app/container.jsx index 05d1ef72c9..d50e2bed2d 100644 --- a/bigbluebutton-html5/imports/ui/components/app/container.jsx +++ b/bigbluebutton-html5/imports/ui/components/app/container.jsx @@ -37,8 +37,8 @@ const defaultProps = { }; const intlMessages = defineMessages({ - kickedMessage: { - id: 'app.error.kicked', + removedMessage: { + id: 'app.error.removed', description: 'Message when the user is removed from the conference', }, waitingApprovalMessage: { @@ -80,7 +80,7 @@ export default withRouter(injectIntl(withModalMounter(withTracker(({ router, int baseControls.updateLoadingState(intl.formatMessage(intlMessages.waitingApprovalMessage)); } - // Displayed error messages according to the mode (kicked, end meeting) + // Displayed error messages according to the mode (removed, end meeting) const sendToError = (code, message) => { Auth.clearCredentials() .then(() => { @@ -89,11 +89,11 @@ export default withRouter(injectIntl(withModalMounter(withTracker(({ router, int }); }; - // Check if user is kicked out of the session + // Check if user is removed out of the session Users.find({ userId: Auth.userID }).observeChanges({ changed(id, fields) { if (fields.ejected) { - sendToError(403, intl.formatMessage(intlMessages.kickedMessage)); + sendToError(403, intl.formatMessage(intlMessages.removedMessage)); } }, }); diff --git a/bigbluebutton-html5/imports/ui/components/user-list/component.jsx b/bigbluebutton-html5/imports/ui/components/user-list/component.jsx index 00daa5eb17..330f874818 100644 --- a/bigbluebutton-html5/imports/ui/components/user-list/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/user-list/component.jsx @@ -23,7 +23,7 @@ const propTypes = { isPublicChat: PropTypes.func.isRequired, setEmojiStatus: PropTypes.func.isRequired, assignPresenter: PropTypes.func.isRequired, - kickUser: PropTypes.func.isRequired, + removeUser: PropTypes.func.isRequired, toggleVoice: PropTypes.func.isRequired, changeRole: PropTypes.func.isRequired, roving: PropTypes.func.isRequired, @@ -63,7 +63,7 @@ class UserList extends Component { isBreakoutRoom={this.props.isBreakoutRoom} setEmojiStatus={this.props.setEmojiStatus} assignPresenter={this.props.assignPresenter} - kickUser={this.props.kickUser} + removeUser={this.props.removeUser} toggleVoice={this.props.toggleVoice} changeRole={this.props.changeRole} meeting={this.props.meeting} diff --git a/bigbluebutton-html5/imports/ui/components/user-list/container.jsx b/bigbluebutton-html5/imports/ui/components/user-list/container.jsx index 9242762db3..af6165f735 100644 --- a/bigbluebutton-html5/imports/ui/components/user-list/container.jsx +++ b/bigbluebutton-html5/imports/ui/components/user-list/container.jsx @@ -18,7 +18,7 @@ const propTypes = { isPublicChat: PropTypes.func.isRequired, setEmojiStatus: PropTypes.func.isRequired, assignPresenter: PropTypes.func.isRequired, - kickUser: PropTypes.func.isRequired, + removeUser: PropTypes.func.isRequired, toggleVoice: PropTypes.func.isRequired, changeRole: PropTypes.func.isRequired, roving: PropTypes.func.isRequired, @@ -37,7 +37,7 @@ const UserListContainer = (props) => { isPublicChat, setEmojiStatus, assignPresenter, - kickUser, + removeUser, toggleVoice, changeRole, roving, @@ -52,7 +52,7 @@ const UserListContainer = (props) => { isBreakoutRoom={isBreakoutRoom} setEmojiStatus={setEmojiStatus} assignPresenter={assignPresenter} - kickUser={kickUser} + removeUser={removeUser} toggleVoice={toggleVoice} changeRole={changeRole} getAvailableActions={getAvailableActions} @@ -78,7 +78,7 @@ export default withTracker(({ params }) => ({ isPublicChat: Service.isPublicChat, setEmojiStatus: Service.setEmojiStatus, assignPresenter: Service.assignPresenter, - kickUser: Service.kickUser, + removeUser: Service.removeUser, toggleVoice: Service.toggleVoice, changeRole: Service.changeRole, roving: Service.roving, diff --git a/bigbluebutton-html5/imports/ui/components/user-list/service.js b/bigbluebutton-html5/imports/ui/components/user-list/service.js index 1116627ff6..9ad599475a 100644 --- a/bigbluebutton-html5/imports/ui/components/user-list/service.js +++ b/bigbluebutton-html5/imports/ui/components/user-list/service.js @@ -239,8 +239,8 @@ const getAvailableActions = (currentUser, user, router, isBreakoutRoom) => { && user.emoji.status !== EMOJI_STATUSES.none && !isDialInUser; - // if currentUser is a moderator, allow kicking other users - const allowedToKick = currentUser.isModerator && !user.isCurrent && !isBreakoutRoom; + // if currentUser is a moderator, allow removing other users + const allowedToRemove = currentUser.isModerator && !user.isCurrent && !isBreakoutRoom; const allowedToSetPresenter = currentUser.isModerator && !user.isPresenter @@ -261,7 +261,7 @@ const getAvailableActions = (currentUser, user, router, isBreakoutRoom) => { allowedToMuteAudio, allowedToUnmuteAudio, allowedToResetStatus, - allowedToKick, + allowedToRemove, allowedToSetPresenter, allowedToPromote, allowedToDemote, @@ -301,11 +301,11 @@ const setEmojiStatus = (userId) => { makeCall('setEmojiStatus', userId, 'none'); const assignPresenter = (userId) => { makeCall('assignPresenter', userId); }; -const kickUser = (userId) => { +const removeUser = (userId) => { if (isVoiceOnlyUser(userId)) { makeCall('ejectUserFromVoice', userId); } else { - makeCall('kickUser', userId); + makeCall('removeUser', userId); } }; @@ -352,7 +352,7 @@ const roving = (event, itemCount, changeState) => { export default { setEmojiStatus, assignPresenter, - kickUser, + removeUser, toggleVoice, changeRole, getUsers, diff --git a/bigbluebutton-html5/imports/ui/components/user-list/user-list-content/component.jsx b/bigbluebutton-html5/imports/ui/components/user-list/user-list-content/component.jsx index 4089ff461f..48c0a86373 100644 --- a/bigbluebutton-html5/imports/ui/components/user-list/user-list-content/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/user-list/user-list-content/component.jsx @@ -20,7 +20,7 @@ const propTypes = { isPublicChat: PropTypes.func.isRequired, setEmojiStatus: PropTypes.func.isRequired, assignPresenter: PropTypes.func.isRequired, - kickUser: PropTypes.func.isRequired, + removeUser: PropTypes.func.isRequired, toggleVoice: PropTypes.func.isRequired, changeRole: PropTypes.func.isRequired, roving: PropTypes.func.isRequired, @@ -54,7 +54,7 @@ class UserContent extends Component { isBreakoutRoom={this.props.isBreakoutRoom} setEmojiStatus={this.props.setEmojiStatus} assignPresenter={this.props.assignPresenter} - kickUser={this.props.kickUser} + removeUser={this.props.removeUser} toggleVoice={this.props.toggleVoice} changeRole={this.props.changeRole} getAvailableActions={this.props.getAvailableActions} diff --git a/bigbluebutton-html5/imports/ui/components/user-list/user-list-content/user-participants/component.jsx b/bigbluebutton-html5/imports/ui/components/user-list/user-list-content/user-participants/component.jsx index cf5c7121a0..f56c57859e 100644 --- a/bigbluebutton-html5/imports/ui/components/user-list/user-list-content/user-participants/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/user-list/user-list-content/user-participants/component.jsx @@ -17,7 +17,7 @@ const propTypes = { isBreakoutRoom: PropTypes.bool, setEmojiStatus: PropTypes.func.isRequired, assignPresenter: PropTypes.func.isRequired, - kickUser: PropTypes.func.isRequired, + removeUser: PropTypes.func.isRequired, toggleVoice: PropTypes.func.isRequired, changeRole: PropTypes.func.isRequired, getAvailableActions: PropTypes.func.isRequired, @@ -60,8 +60,8 @@ const intlMessages = defineMessages({ id: 'app.userList.menu.makePresenter.label', description: 'Set this user to be the presenter in this meeting', }, - KickUserLabel: { - id: 'app.userList.menu.kickUser.label', + RemoveUserLabel: { + id: 'app.userList.menu.removeUser.label', description: 'Forcefully remove this user from the meeting', }, MuteUserAudioLabel: { @@ -140,7 +140,7 @@ class UserParticipants extends Component { changeRole, assignPresenter, setEmojiStatus, - kickUser, + removeUser, toggleVoice, } = this.props; @@ -161,9 +161,9 @@ class UserParticipants extends Component { handler: user => assignPresenter(user.id), icon: 'presentation', }, - kick: { - label: user => intl.formatMessage(intlMessages.KickUserLabel, { 0: user.name }), - handler: user => kickUser(user.id), + remove: { + label: user => intl.formatMessage(intlMessages.RemoveUserLabel, { 0: user.name }), + handler: user => removeUser(user.id), icon: 'circle_close', }, mute: { diff --git a/bigbluebutton-html5/imports/ui/components/user-list/user-list-content/user-participants/user-list-item/component.jsx b/bigbluebutton-html5/imports/ui/components/user-list/user-list-content/user-participants/user-list-item/component.jsx index fe70a3f4a3..26d2c09dc9 100644 --- a/bigbluebutton-html5/imports/ui/components/user-list/user-list-content/user-participants/user-list-item/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/user-list/user-list-content/user-participants/user-list-item/component.jsx @@ -64,7 +64,7 @@ class UserListItem extends Component { openChat, clearStatus, setPresenter, - kick, + remove, mute, unmute, promote, @@ -78,7 +78,7 @@ class UserListItem extends Component { allowedToMuteAudio, allowedToUnmuteAudio, allowedToResetStatus, - allowedToKick, + allowedToRemove, allowedToSetPresenter, allowedToPromote, allowedToDemote, @@ -90,7 +90,7 @@ class UserListItem extends Component { (allowedToUnmuteAudio ? UserListItem.createAction(unmute, user) : null), (allowedToResetStatus ? UserListItem.createAction(clearStatus, user) : null), (allowedToSetPresenter ? UserListItem.createAction(setPresenter, user) : null), - (allowedToKick ? UserListItem.createAction(kick, user) : null), + (allowedToRemove ? UserListItem.createAction(remove, user) : null), (allowedToPromote ? UserListItem.createAction(promote, user) : null), (allowedToDemote ? UserListItem.createAction(demote, user) : null), ]); diff --git a/bigbluebutton-html5/private/config/settings-development.json b/bigbluebutton-html5/private/config/settings-development.json index 6fe0bd9498..b98a8d6a01 100644 --- a/bigbluebutton-html5/private/config/settings-development.json +++ b/bigbluebutton-html5/private/config/settings-development.json @@ -88,7 +88,7 @@ "moderator": { "methods": [ "assignPresenter", - "kickUser", + "removeUser", "muteUser", "unmuteUser", "endMeeting", diff --git a/bigbluebutton-html5/private/config/settings-production.json b/bigbluebutton-html5/private/config/settings-production.json index 34a90db20d..837deb8c07 100644 --- a/bigbluebutton-html5/private/config/settings-production.json +++ b/bigbluebutton-html5/private/config/settings-production.json @@ -88,7 +88,7 @@ "moderator": { "methods": [ "assignPresenter", - "kickUser", + "removeUser", "muteUser", "unmuteUser", "endMeeting", diff --git a/bigbluebutton-html5/private/locales/en.json b/bigbluebutton-html5/private/locales/en.json index a77a5f301c..687075fb54 100644 --- a/bigbluebutton-html5/private/locales/en.json +++ b/bigbluebutton-html5/private/locales/en.json @@ -33,7 +33,7 @@ "app.userList.menu.chat.label": "Chat", "app.userList.menu.clearStatus.label": "Clear Status", "app.userList.menu.makePresenter.label": "Make Presenter", - "app.userList.menu.kickUser.label": "Kick user", + "app.userList.menu.removeUser.label": "Remove user", "app.userList.menu.muteUserAudio.label": "Mute user", "app.userList.menu.unmuteUserAudio.label": "Unmute user", "app.userList.userAriaLabel": "User : {0} Role: {1} Person: {2} Status: {3}", @@ -261,7 +261,7 @@ "app.audio.listenOnly.closeLabel": "Close", "app.audio.permissionsOverlay.title": "Allow BigBlueButton to use your Media Devices", "app.audio.permissionsOverlay.hint": "We need you to allow us to use your Media Devices in order to join you to the voice conference :)", - "app.error.kicked": "You have been removed from the conference", + "app.error.removed": "You have been removed from the conference", "app.error.meeting.ended": "You have logged out of the conference", "app.dropdown.close": "Close", "app.error.500": "Ops, something went wrong",