RocketChat/Rocket.Chat · error · Meteor.Error
error-action-not-allowed
error-action-not-allowed
Error message
Auto-Translate is not allowed
What it means
Thrown when a user without the 'auto-translate' permission calls 'autoTranslate.getSupportedLanguages' (DDP). The REST twin enforces authentication only, so this surfaces mainly on the DDP path through the shared lib. Auto-Translate is not granted to all roles by default; it must be added to a role the user holds.
Source
Thrown at apps/meteor/server/lib/autotranslate/functions/getSupportedLanguages.ts:13
import { Meteor } from 'meteor/meteor';
import { settings } from '../../../settings';
import { hasPermissionAsync } from '../../authorization/hasPermission';
import { TranslationProviderRegistry } from '../index';
export const getSupportedLanguages = async (userId: string, targetLanguage: string) => {
if (!settings.get('AutoTranslate_Enabled')) {
throw new Meteor.Error('error-autotranslate-disabled', 'Auto-Translate is disabled');
}
if (!(await hasPermissionAsync(userId, 'auto-translate'))) {
throw new Meteor.Error('error-action-not-allowed', 'Auto-Translate is not allowed', {
method: 'autoTranslate.getSupportedLanguages',
});
}
return TranslationProviderRegistry.getSupportedLanguages(targetLanguage);
};
View on GitHub (pinned to b2c16d5842)
Solutions
- Grant 'auto-translate' to the roles that need it under Administration > Permissions
- Check the user's effective permissions before exposing the translate UI
- Catch the error and hide the translate option instead of erroring on every poll
Defensive patterns
Strategy: validation
Validate before calling
const me = await GET '/api/v1/me';
if (!me.permissions?.includes('auto-translate')) {
// do not call autoTranslate.getSupportedLanguages for this user
} Try / catch
try {
await call('autoTranslate.getSupportedLanguages', targetLanguage);
} catch (e) {
if (e instanceof Meteor.Error && e.error === 'error-action-not-allowed') {
// user lacks the 'auto-translate' permission - hide the feature
} else {
throw e;
}
} Prevention
- Check the user's permission list before rendering translate controls
- Cache the permission result instead of re-triggering failing calls
- When enabling Auto-Translate, also assign the permission to the target roles
When it happens
Trigger: A regular user opens the translate UI without the 'auto-translate' permission; a custom role created without it; the permission revoked while the user's client keeps polling languages.
Common situations: Admins enable the AutoTranslate_Enabled setting but forget to grant the permission to user/admin roles; bots or federation users lacking the permission.
Understand the failure class
Background: Permission denied / not authorized / 403 Forbidden: access-control rejections when the caller lacks the required role, grant, or ownership — this error's family across 18 libraries.
Related errors
AI-assisted analysis of RocketChat/Rocket.Chat@b2c16d5842 (2026-08-18).
Data as JSON: /api/errors/d9c6f5470948beee.
Report an issue: GitHub.