// Insert server unique id if it doesn't exist
RocketChat.settings.add('uniqueID', process.env.DEPLOYMENT_ID || Random.id(), {
'public': true,
hidden: true
});
// When you define a setting and want to add a description, you don't need to automatically define the i18nDescription
// if you add a node to the i18n.json with the same setting name but with `_Description` it will automatically work.
RocketChat.settings.addGroup('Accounts', function() {
this.add('Accounts_AllowAnonymousRead', false, {
type: 'boolean',
public: true
});
this.add('Accounts_AllowAnonymousWrite', false, {
type: 'boolean',
public: true,
enableQuery: {
_id: 'Accounts_AllowAnonymousRead',
value: true
}
});
this.add('Accounts_AllowDeleteOwnAccount', false, {
type: 'boolean',
'public': true,
enableQuery: {
_id: 'Accounts_AllowUserProfileChange',
value: true
}
});
this.add('Accounts_AllowUserProfileChange', true, {
type: 'boolean',
'public': true
});
this.add('Accounts_AllowUserAvatarChange', true, {
type: 'boolean',
'public': true
});
this.add('Accounts_AllowRealNameChange', true, {
type: 'boolean',
'public': true
});
this.add('Accounts_AllowUsernameChange', true, {
type: 'boolean',
'public': true
});
this.add('Accounts_AllowEmailChange', true, {
type: 'boolean',
'public': true
});
this.add('Accounts_AllowPasswordChange', true, {
type: 'boolean',
'public': true
});
this.add('Accounts_CustomFieldsToShowInUserInfo', '', {
type: 'string',
public: true
});
this.add('Accounts_LoginExpiration', 90, {
type: 'int',
'public': true
});
this.add('Accounts_ShowFormLogin', true, {
type: 'boolean',
'public': true
});
this.add('Accounts_EmailOrUsernamePlaceholder', '', {
type: 'string',
'public': true,
i18nLabel: 'Placeholder_for_email_or_username_login_field'
});
this.add('Accounts_PasswordPlaceholder', '', {
type: 'string',
'public': true,
i18nLabel: 'Placeholder_for_password_login_field'
});
this.add('Accounts_ForgetUserSessionOnWindowClose', false, {
type: 'boolean',
'public': true
});
this.add('Accounts_SearchFields', 'username, name, emails.address', {
type: 'string',
public: true
});
this.section('Registration', function() {
this.add('Accounts_DefaultUsernamePrefixSuggestion', 'user', {
type: 'string'
});
this.add('Accounts_RequireNameForSignUp', true, {
type: 'boolean',
'public': true
});
this.add('Accounts_RequirePasswordConfirmation', true, {
type: 'boolean',
'public': true
});
this.add('Accounts_EmailVerification', false, {
type: 'boolean',
'public': true,
enableQuery: {
_id: 'SMTP_Host',
value: {
$exists: 1,
$ne: ''
}
}
});
this.add('Accounts_ManuallyApproveNewUsers', false, {
type: 'boolean'
});
this.add('Accounts_AllowedDomainsList', '', {
type: 'string',
'public': true
});
this.add('Accounts_BlockedDomainsList', '', {
type: 'string'
});
this.add('Accounts_BlockedUsernameList', '', {
type: 'string'
});
this.add('Accounts_UseDefaultBlockedDomainsList', true, {
type: 'boolean'
});
this.add('Accounts_UseDNSDomainCheck', false, {
type: 'boolean'
});
this.add('Accounts_RegistrationForm', 'Public', {
type: 'select',
'public': true,
values: [
{
key: 'Public',
i18nLabel: 'Accounts_RegistrationForm_Public'
}, {
key: 'Disabled',
i18nLabel: 'Accounts_RegistrationForm_Disabled'
}, {
key: 'Secret URL',
i18nLabel: 'Accounts_RegistrationForm_Secret_URL'
}
]
});
this.add('Accounts_RegistrationForm_SecretURL', Random.id(), {
type: 'string'
});
this.add('Accounts_RegistrationForm_LinkReplacementText', 'New user registration is currently disabled', {
type: 'string',
'public': true
});
this.add('Accounts_Registration_AuthenticationServices_Enabled', true, {
type: 'boolean',
'public': true
});
this.add('Accounts_Registration_AuthenticationServices_Default_Roles', 'user', {
type: 'string',
enableQuery: {
_id: 'Accounts_Registration_AuthenticationServices_Enabled',
value: true
}
});
this.add('Accounts_PasswordReset', true, {
type: 'boolean',
'public': true
});
this.add('Accounts_CustomFields', '', {
type: 'code',
'public': true,
i18nLabel: 'Custom_Fields'
});
});
this.section('Accounts_Default_User_Preferences', function() {
this.add('Accounts_Default_User_Preferences_enableAutoAway', false, {
type: 'boolean',
'public': true,
i18nLabel: 'Enable_Auto_Away'
});
this.add('Accounts_Default_User_Preferences_idleTimeoutLimit', 300000, {
type: 'int',
'public': true,
i18nLabel: 'Idle_Time_Limit'
});
this.add('Accounts_Default_User_Preferences_desktopNotificationDuration', 0, {
type: 'int',
'public': true,
i18nLabel: 'Notification_Duration'
});
this.add('Accounts_Default_User_Preferences_audioNotifications', 'mentions', {
type: 'select',
values: [
{
key: 'all',
i18nLabel: 'All_messages'
},
{
key: 'mentions',
i18nLabel: 'Mentions'
},
{
key: 'nothing',
i18nLabel: 'Nothing'
}
],
public: true
});
this.add('Accounts_Default_User_Preferences_desktopNotifications', 'mentions', {
type: 'select',
values: [
{
key: 'all',
i18nLabel: 'All_messages'
},
{
key: 'mentions',
i18nLabel: 'Mentions'
},
{
key: 'nothing',
i18nLabel: 'Nothing'
}
],
'public': true
});
this.add('Accounts_Default_User_Preferences_mobileNotifications', 'mentions', {
type: 'select',
values: [
{
key : 'all',
i18nLabel : 'All_messages'
},
{
key : 'mentions',
i18nLabel : 'Mentions'
},
{
key : 'nothing',
i18nLabel : 'Nothing'
}
],
'public': true
});
this.add('Accounts_Default_User_Preferences_unreadAlert', true, {
type: 'boolean',
'public': true,
i18nLabel: 'Unread_Tray_Icon_Alert'
});
this.add('Accounts_Default_User_Preferences_useEmojis', true, {
type: 'boolean',
'public': true,
i18nLabel: 'Use_Emojis'
});
this.add('Accounts_Default_User_Preferences_convertAsciiEmoji', true, {
type: 'boolean',
'public': true,
i18nLabel: 'Convert_Ascii_Emojis'
});
this.add('Accounts_Default_User_Preferences_autoImageLoad', true, {
type: 'boolean',
'public': true,
i18nLabel: 'Auto_Load_Images'
});
this.add('Accounts_Default_User_Preferences_saveMobileBandwidth', true, {
type: 'boolean',
'public': true,
i18nLabel: 'Save_Mobile_Bandwidth'
});
this.add('Accounts_Default_User_Preferences_collapseMediaByDefault', false, {
type: 'boolean',
'public': true,
i18nLabel: 'Collapse_Embedded_Media_By_Default'
});
this.add('Accounts_Default_User_Preferences_hideUsernames', false, {
type: 'boolean',
'public': true,
i18nLabel: 'Hide_usernames'
});
this.add('Accounts_Default_User_Preferences_hideRoles', false, {
type: 'boolean',
'public': true,
i18nLabel: 'Hide_roles'
});
this.add('Accounts_Default_User_Preferences_hideFlexTab', false, {
type: 'boolean',
'public': true,
i18nLabel: 'Hide_flextab'
});
this.add('Accounts_Default_User_Preferences_hideAvatars', false, {
type: 'boolean',
'public': true,
i18nLabel: 'Hide_Avatars'
});
this.add('Accounts_Default_User_Preferences_roomsListExhibitionMode', 'category', {
type: 'select',
values: [
{
key: 'unread',
i18nLabel: 'Unread_Rooms_Mode'
},
{
key: 'activity',
i18nLabel: 'Sort_by_activity'
},
{
key: 'category',
i18nLabel: 'Split_by_categories'
}
],
'public': true,
i18nLabel: 'Sidebar_list_mode'
});
this.add('Accounts_Default_User_Preferences_mergeChannels', false, {
type: 'boolean',
'public': true,
i18nLabel: 'UI_Merge_Channels_Groups'
});
this.add('Accounts_Default_User_Preferences_sendOnEnter', 'normal', {
type: 'select',
values: [
{
key: 'normal',
i18nLabel: 'Enter_Normal'
},
{
key: 'alternative',
i18nLabel: 'Enter_Alternative'
},
{
key: 'desktop',
i18nLabel: 'Only_On_Desktop'
}
],
'public': true,
i18nLabel: 'Enter_Behaviour'
});
this.add('Accounts_Default_User_Preferences_viewMode', 0, {
type: 'select',
values: [
{
key: 0,
i18nLabel: 'Normal'
},
{
key: 1,
i18nLabel: 'Cozy'
},
{
key: 2,
i18nLabel: 'Compact'
}
],
'public': true,
i18nLabel: 'View_mode'
});
this.add('Accounts_Default_User_Preferences_emailNotificationMode', 'all', {
type: 'select',
values: [
{
key: 'disabled',
i18nLabel: 'Email_Notification_Mode_Disabled'
},
{
key: 'all',
i18nLabel: 'Email_Notification_Mode_All'
}
],
'public': true,
i18nLabel: 'Email_Notification_Mode'
});
this.add('Accounts_Default_User_Preferences_roomCounterSidebar', false, {
type: 'boolean',
'public': true,
i18nLabel: 'Show_room_counter_on_sidebar'
});
this.add('Accounts_Default_User_Preferences_newRoomNotification', 'door', {
type: 'select',
values: [
{
key: 'none',
i18nLabel: 'None'
},
{
key: 'door',
i18nLabel: 'Default'
}
],
'public': true,
i18nLabel: 'New_Room_Notification'
});
this.add('Accounts_Default_User_Preferences_newMessageNotification', 'chime', {
type: 'select',
values: [
{
key: 'none',
i18nLabel: 'None'
},
{
key: 'chime',
i18nLabel: 'Default'
}
],
'public': true,
i18nLabel: 'New_Message_Notification'
});
this.add('Accounts_Default_User_Preferences_muteFocusedConversations', true, {
type: 'boolean',
'public': true,
i18nLabel: 'Mute_Focused_Conversations'
});
this.add('Accounts_Default_User_Preferences_notificationsSoundVolume', 100, {
type: 'int',
'public': true,
i18nLabel: 'Notifications_Sound_Volume'
});
});
this.section('Avatar', function() {
this.add('Accounts_AvatarResize', true, {
type: 'boolean'
});
this.add('Accounts_AvatarSize', 200, {
type: 'int',
enableQuery: {
_id: 'Accounts_AvatarResize',
value: true
}
});
return this.add('Accounts_SetDefaultAvatar', true, {
type: 'boolean'
});
});
});
RocketChat.settings.addGroup('OAuth', function() {
this.section('Facebook', function() {
const enableQuery = {
_id: 'Accounts_OAuth_Facebook',
value: true
};
this.add('Accounts_OAuth_Facebook', false, {
type: 'boolean',
'public': true
});
this.add('Accounts_OAuth_Facebook_id', '', {
type: 'string',
enableQuery
});
this.add('Accounts_OAuth_Facebook_secret', '', {
type: 'string',
enableQuery
});
return this.add('Accounts_OAuth_Facebook_callback_url', '_oauth/facebook', {
type: 'relativeUrl',
readonly: true,
force: true,
enableQuery
});
});
this.section('Google', function() {
const enableQuery = {
_id: 'Accounts_OAuth_Google',
value: true
};
this.add('Accounts_OAuth_Google', false, {
type: 'boolean',
'public': true
});
this.add('Accounts_OAuth_Google_id', '', {
type: 'string',
enableQuery
});
this.add('Accounts_OAuth_Google_secret', '', {
type: 'string',
enableQuery
});
return this.add('Accounts_OAuth_Google_callback_url', '_oauth/google', {
type: 'relativeUrl',
readonly: true,
force: true,
enableQuery
});
});
this.section('GitHub', function() {
const enableQuery = {
_id: 'Accounts_OAuth_Github',
value: true
};
this.add('Accounts_OAuth_Github', false, {
type: 'boolean',
'public': true
});
this.add('Accounts_OAuth_Github_id', '', {
type: 'string',
enableQuery
});
this.add('Accounts_OAuth_Github_secret', '', {
type: 'string',
enableQuery
});
return this.add('Accounts_OAuth_Github_callback_url', '_oauth/github', {
type: 'relativeUrl',
readonly: true,
force: true,
enableQuery
});
});
this.section('Linkedin', function() {
const enableQuery = {
_id: 'Accounts_OAuth_Linkedin',
value: true
};
this.add('Accounts_OAuth_Linkedin', false, {
type: 'boolean',
'public': true
});
this.add('Accounts_OAuth_Linkedin_id', '', {
type: 'string',
enableQuery
});
this.add('Accounts_OAuth_Linkedin_secret', '', {
type: 'string',
enableQuery
});
return this.add('Accounts_OAuth_Linkedin_callback_url', '_oauth/linkedin', {
type: 'relativeUrl',
readonly: true,
force: true,
enableQuery
});
});
this.section('Meteor', function() {
const enableQuery = {
_id: 'Accounts_OAuth_Meteor',
value: true
};
this.add('Accounts_OAuth_Meteor', false, {
type: 'boolean',
'public': true
});
this.add('Accounts_OAuth_Meteor_id', '', {
type: 'string',
enableQuery
});
this.add('Accounts_OAuth_Meteor_secret', '', {
type: 'string',
enableQuery
});
return this.add('Accounts_OAuth_Meteor_callback_url', '_oauth/meteor', {
type: 'relativeUrl',
readonly: true,
force: true,
enableQuery
});
});
this.section('Twitter', function() {
const enableQuery = {
_id: 'Accounts_OAuth_Twitter',
value: true
};
this.add('Accounts_OAuth_Twitter', false, {
type: 'boolean',
'public': true
});
this.add('Accounts_OAuth_Twitter_id', '', {
type: 'string',
enableQuery
});
this.add('Accounts_OAuth_Twitter_secret', '', {
type: 'string',
enableQuery
});
return this.add('Accounts_OAuth_Twitter_callback_url', '_oauth/twitter', {
type: 'relativeUrl',
readonly: true,
force: true,
enableQuery
});
});
return this.section('Proxy', function() {
this.add('Accounts_OAuth_Proxy_host', 'https://oauth-proxy.rocket.chat', {
type: 'string',
'public': true
});
return this.add('Accounts_OAuth_Proxy_services', '', {
type: 'string',
'public': true
});
});
});
RocketChat.settings.addGroup('General', function() {
this.add('Site_Url', typeof __meteor_runtime_config__ !== 'undefined' && __meteor_runtime_config__ !== null ? __meteor_runtime_config__.ROOT_URL : null, {
type: 'string',
i18nDescription: 'Site_Url_Description',
'public': true
});
this.add('Site_Name', 'Rocket.Chat', {
type: 'string',
'public': true
});
this.add('Language', '', {
type: 'language',
'public': true
});
this.add('Allow_Invalid_SelfSigned_Certs', false, {
type: 'boolean'
});
this.add('Favorite_Rooms', true, {
type: 'boolean',
'public': true
});
this.add('First_Channel_After_Login', '', {
type: 'string',
'public': true
});
this.add('Unread_Count', 'user_and_group_mentions_only', {
type: 'select',
values: [
{
key: 'all_messages',
i18nLabel: 'All_messages'
}, {
key: 'user_mentions_only',
i18nLabel: 'User_mentions_only'
}, {
key: 'group_mentions_only',
i18nLabel: 'Group_mentions_only'
}, {
key: 'user_and_group_mentions_only',
i18nLabel: 'User_and_group_mentions_only'
}
],
'public': true
});
this.add('Unread_Count_DM', 'all_messages', {
type: 'select',
values: [
{
key: 'all_messages',
i18nLabel: 'All_messages'
}, {
key: 'mentions_only',
i18nLabel: 'Mentions_only'
}
],
'public': true
});
this.add('CDN_PREFIX', '', {
type: 'string',
'public': true
});
this.add('Force_SSL', false, {
type: 'boolean',
'public': true
});
this.add('GoogleTagManager_id', '', {
type: 'string',
'public': true
});
this.add('Bugsnag_api_key', '', {
type: 'string',
'public': false
});
this.add('Force_Disable_OpLog_For_Cache', false, {
type: 'boolean',
'public': false
});
this.add('Restart', 'restart_server', {
type: 'action',
actionText: 'Restart_the_server'
});
this.add('Store_Last_Message', false, {
type: 'boolean',
public: true,
i18nDescription: 'Store_Last_Message_Sent_per_Room'
});
this.section('UTF8', function() {
this.add('UTF8_Names_Validation', '[0-9a-zA-Z-_.]+', {
type: 'string',
'public': true,
i18nDescription: 'UTF8_Names_Validation_Description'
});
return this.add('UTF8_Names_Slugify', true, {
type: 'boolean',
'public': true
});
});
this.section('Reporting', function() {
return this.add('Statistics_reporting', true, {
type: 'boolean'
});
});
this.section('Notifications', function() {
this.add('Notifications_Max_Room_Members', 100, {
type: 'int',
public: true,
i18nDescription: 'Notifications_Max_Room_Members_Description'
});
this.add('Notifications_Always_Notify_Mobile', false, {
type: 'boolean',
public: true,
i18nDescription: 'Notifications_Always_Notify_Mobile_Description'
});
});
this.section('REST API', function() {
return this.add('API_User_Limit', 500, {
type: 'int',
'public': true,
i18nDescription: 'API_User_Limit'
});
});
this.section('Iframe_Integration', function() {
this.add('Iframe_Integration_send_enable', false, {
type: 'boolean',
'public': true
});
this.add('Iframe_Integration_send_target_origin', '*', {
type: 'string',
'public': true,
enableQuery: {
_id: 'Iframe_Integration_send_enable',
value: true
}
});
this.add('Iframe_Integration_receive_enable', false, {
type: 'boolean',
'public': true
});
return this.add('Iframe_Integration_receive_origin', '*', {
type: 'string',
'public': true,
enableQuery: {
_id: 'Iframe_Integration_receive_enable',
value: true
}
});
});
this.section('Translations', function() {
return this.add('Custom_Translations', '', {
type: 'code',
'public': true
});
});
return this.section('Stream_Cast', function() {
return this.add('Stream_Cast_Address', '', {
type: 'string'
});
});
});
RocketChat.settings.addGroup('Email', function() {
this.section('Subject', function() {
this.add('Offline_DM_Email', '[[Site_Name]] You have been direct messaged by [User]', {
type: 'code',
code: 'text',
multiline: true,
i18nLabel: 'Offline_DM_Email',
i18nDescription: 'Offline_Email_Subject_Description'
});
this.add('Offline_Mention_Email', '[[Site_Name]] You have been mentioned by [User] in #[Room]', {
type: 'code',
code: 'text',
multiline: true,
i18nLabel: 'Offline_Mention_Email',
i18nDescription: 'Offline_Email_Subject_Description'
});
return this.add('Offline_Mention_All_Email', '[User] has posted a message in #[Room]', {
type: 'code',
code: 'text',
multiline: true,
i18nLabel: 'Offline_Mention_All_Email',
i18nDescription: 'Offline_Email_Subject_Description'
});
});
this.section('Header_and_Footer', function() {
this.add('Email_Header', '
[Site_Name] | ', {
type: 'code',
code: 'text/html',
multiline: true,
i18nLabel: 'Header'
});
this.add('Email_Footer', ' |
| Powered by Rocket.Chat |
|
', {
type: 'code',
code: 'text/html',
multiline: true,
i18nLabel: 'Footer'
});
return this.add('Email_Footer_Direct_Reply', 'You can directly reply to this email. Do not modify previous emails in the thread. Powered by Rocket.Chat |