Skip to content

Commit bcbb97b

Browse files
vynmeraggazzo
authored andcommitted
[FIX] Some typos in the error message names (#11136)
Some places were returning `error-action-now-allowed` instead of `error-action-not-allowed`, which is all a bit confusing but definitely should not be the case.
1 parent db0edc4 commit bcbb97b

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

packages/rocketchat-assets/server/assets.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ Meteor.methods({
396396

397397
const hasPermission = RocketChat.authz.hasPermission(Meteor.userId(), 'manage-assets');
398398
if (!hasPermission) {
399-
throw new Meteor.Error('error-action-now-allowed', 'Managing assets not allowed', {
399+
throw new Meteor.Error('error-action-not-allowed', 'Managing assets not allowed', {
400400
method: 'refreshClients',
401401
action: 'Managing_assets'
402402
});
@@ -414,7 +414,7 @@ Meteor.methods({
414414

415415
const hasPermission = RocketChat.authz.hasPermission(Meteor.userId(), 'manage-assets');
416416
if (!hasPermission) {
417-
throw new Meteor.Error('error-action-now-allowed', 'Managing assets not allowed', {
417+
throw new Meteor.Error('error-action-not-allowed', 'Managing assets not allowed', {
418418
method: 'unsetAsset',
419419
action: 'Managing_assets'
420420
});
@@ -432,7 +432,7 @@ Meteor.methods({
432432

433433
const hasPermission = RocketChat.authz.hasPermission(Meteor.userId(), 'manage-assets');
434434
if (!hasPermission) {
435-
throw new Meteor.Error('error-action-now-allowed', 'Managing assets not allowed', {
435+
throw new Meteor.Error('error-action-not-allowed', 'Managing assets not allowed', {
436436
method: 'setAsset',
437437
action: 'Managing_assets'
438438
});

packages/rocketchat-autotranslate/server/methods/getSupportedLanguages.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Meteor.methods({
22
'autoTranslate.getSupportedLanguages'(targetLanguage) {
33
if (!RocketChat.authz.hasPermission(Meteor.userId(), 'auto-translate')) {
4-
throw new Meteor.Error('error-action-now-allowed', 'Auto-Translate is not allowed', { method: 'autoTranslate.saveSettings'});
4+
throw new Meteor.Error('error-action-not-allowed', 'Auto-Translate is not allowed', { method: 'autoTranslate.saveSettings'});
55
}
66

77
return RocketChat.AutoTranslate.getSupportedLanguages(targetLanguage);

packages/rocketchat-autotranslate/server/methods/saveSettings.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Meteor.methods({
55
}
66

77
if (!RocketChat.authz.hasPermission(Meteor.userId(), 'auto-translate')) {
8-
throw new Meteor.Error('error-action-now-allowed', 'Auto-Translate is not allowed', { method: 'autoTranslate.saveSettings'});
8+
throw new Meteor.Error('error-action-not-allowed', 'Auto-Translate is not allowed', { method: 'autoTranslate.saveSettings'});
99
}
1010

1111
check(rid, String);

0 commit comments

Comments
 (0)