Skip to content
Snippets Groups Projects
Commit d7b5ae3c authored by Oleksandr Zhurbenko's avatar Oleksandr Zhurbenko
Browse files

Fixed permissions and some exceptions

parent 1da494ee
No related branches found
No related tags found
No related merge requests found
......@@ -6,7 +6,7 @@ import { isAllowedTo } from '/imports/startup/server/userPermissions';
Meteor.publish('chat', (credentials) => {
if (!isAllowedTo('subscribeChat', credentials)) {
this.error(new Meteor.Error(402, "The user was not authorized to subscribe for 'chats'"));
throw new Meteor.Error(402, "The user was not authorized to subscribe for 'chats'");
}
const CHAT_CONFIG = Meteor.settings.public.chat;
......
......@@ -7,7 +7,7 @@ import { logger } from '/imports/startup/server/logger';
Meteor.publish('polls', (credentials) => {
//checking if it is allowed to see Poll Collection in general
if (!isAllowedTo('subscribePoll', credentials)) {
this.error(new Meteor.Error(402, "The user was not authorized to subscribe for 'polls'"));
throw new Meteor.Error(402, "The user was not authorized to subscribe for 'polls'");
}
const { meetingId, requesterUserId, requesterToken } = credentials;
......
......@@ -30,11 +30,11 @@ export default function userLeaving(credentials, userId) {
'user-not-found', `You need a valid user to be able to toggle audio`);
}
if (User.user.connection_status === OFFLINE_CONNECTION_STATUS) {
if (User.connection_status === OFFLINE_CONNECTION_STATUS) {
return;
}
if (User.user.listenOnly) {
if (User.listenOnly) {
listenOnlyToggle(credentials, false);
}
......
......@@ -9,7 +9,6 @@ const presenter = {
subscribePoll: true,
subscribeAnswers: true,
setPresenter: true,
};
// holds the values for whether the moderator user is allowed to perform an action (true)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment