Merge pull request #9315 from jfsiebel/enforce-extract-credentials
Enforce extractCredentials
This commit is contained in:
commit
8f6e87b5ab
@ -1,13 +1,16 @@
|
||||
import { Meteor } from 'meteor/meteor';
|
||||
import { check } from 'meteor/check';
|
||||
import RedisPubSub from '/imports/startup/server/redis';
|
||||
import { extractCredentials } from '/imports/api/common/server/helpers';
|
||||
|
||||
export default function setPresenterInPodReqMsg(credentials) { // TODO-- switch to meetingId, etc
|
||||
const REDIS_CONFIG = Meteor.settings.private.redis;
|
||||
const CHANNEL = REDIS_CONFIG.channels.toAkkaApps;
|
||||
const EVENT_NAME = 'SetPresenterInPodReqMsg';
|
||||
|
||||
const { meetingId, requesterUserId, presenterId } = credentials;
|
||||
const { presenterId } = credentials;
|
||||
|
||||
const { meetingId, requesterUserId } = extractCredentials(this.userId);
|
||||
|
||||
check(meetingId, String);
|
||||
check(requesterUserId, String);
|
||||
|
@ -1,7 +1,9 @@
|
||||
import UserInfos from '/imports/api/users-infos';
|
||||
import Logger from '/imports/startup/server/logger';
|
||||
import { extractCredentials } from '/imports/api/common/server/helpers';
|
||||
|
||||
export default function removeUserInformation(meetingId, requesterUserId) {
|
||||
export default function removeUserInformation() {
|
||||
const { meetingId, requesterUserId } = extractCredentials(this.userId);
|
||||
const selector = {
|
||||
meetingId,
|
||||
requesterUserId,
|
||||
|
@ -1,6 +1,7 @@
|
||||
import { check } from 'meteor/check';
|
||||
import addUserSetting from '/imports/api/users-settings/server/modifiers/addUserSetting';
|
||||
import logger from '/imports/startup/server/logger';
|
||||
import { extractCredentials } from '/imports/api/common/server/helpers';
|
||||
|
||||
const oldParameters = {
|
||||
askForFeedbackOnLogout: 'bbb_ask_for_feedback_on_logout',
|
||||
@ -73,9 +74,11 @@ function valueParser(val) {
|
||||
}
|
||||
}
|
||||
|
||||
export default function addUserSettings(meetingId, userId, settings) {
|
||||
export default function addUserSettings(settings) {
|
||||
check(settings, [Object]);
|
||||
|
||||
const { meetingId, requesterUserId: userId } = extractCredentials(this.userId);
|
||||
|
||||
let parameters = {};
|
||||
|
||||
settings.forEach((el) => {
|
||||
|
@ -140,13 +140,11 @@ class JoinHandler extends Component {
|
||||
};
|
||||
|
||||
const setCustomData = (resp) => {
|
||||
const {
|
||||
meetingID, internalUserID, customdata,
|
||||
} = resp;
|
||||
const { customdata } = resp;
|
||||
|
||||
return new Promise((resolve) => {
|
||||
if (customdata.length) {
|
||||
makeCall('addUserSettings', meetingID, internalUserID, customdata).then(r => resolve(r));
|
||||
makeCall('addUserSettings', customdata).then(r => resolve(r));
|
||||
}
|
||||
resolve(true);
|
||||
});
|
||||
|
@ -53,13 +53,11 @@ class UserInfoComponent extends Component {
|
||||
}
|
||||
|
||||
render() {
|
||||
const {
|
||||
intl, meetingId, requesterUserId,
|
||||
} = this.props;
|
||||
const { intl } = this.props;
|
||||
return (
|
||||
<Modal
|
||||
title={intl.formatMessage(intlMessages.title)}
|
||||
onRequestClose={() => Service.handleCloseUserInfo(meetingId, requesterUserId)}
|
||||
onRequestClose={() => Service.handleCloseUserInfo()}
|
||||
>
|
||||
{this.renderUserInfo()}
|
||||
</Modal>
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { makeCall } from '/imports/ui/services/api';
|
||||
|
||||
export default {
|
||||
handleCloseUserInfo: (meetingId, requesterUserId) => {
|
||||
makeCall('removeUserInformation', meetingId, requesterUserId);
|
||||
handleCloseUserInfo: () => {
|
||||
makeCall('removeUserInformation');
|
||||
},
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user