Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

Add new bot account settings page. #2954

Merged
merged 7 commits into from
Jun 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,11 @@ exports[`components/AdminConsole should generate the routes 1`] = `
path="/integrations/integration_management"
render={[Function]}
/>
<Route
key="integrations/bot_accounts"
path="/integrations/bot_accounts"
render={[Function]}
/>
<Route
key="integrations/gif"
path="/integrations/gif"
Expand Down
31 changes: 26 additions & 5 deletions components/admin_console/admin_definition.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3397,6 +3397,27 @@ export default {
help_text_default: 'When true, webhooks, slash commands and other integrations, such as [Zapier](!https://docs.mattermost.com/integrations/zapier.html), will be allowed to change the profile picture they post with. Note: Combined with allowing integrations to override usernames, users may be able to perform phishing attacks by attempting to impersonate other users.',
help_text_markdown: true,
},
{
type: Constants.SettingsTypes.TYPE_BOOL,
key: 'ServiceSettings.EnableUserAccessTokens',
label: t('admin.service.userAccessTokensTitle'),
label_default: 'Enable User Access Tokens: ',
help_text: t('admin.service.userAccessTokensDescription'),
help_text_default: 'When true, users can create [user access tokens](!https://about.mattermost.com/default-user-access-tokens) for integrations in **Account Settings > Security**. They can be used to authenticate against the API and give full access to the account.\n\n To manage who can create personal access tokens or to search users by token ID, go to the **User Management > Users** page.',
help_text_markdown: true,
},
],
},
},
bot_accounts: {
url: 'integrations/bot_accounts',
title: t('admin.integrations.botAccounts'),
title_default: 'Bot Accounts',
schema: {
id: 'BotAccountSettings',
name: t('admin.integrations.botAccounts.title'),
name_default: 'Bot Accounts',
settings: [
{
type: Constants.SettingsTypes.TYPE_BOOL,
key: 'ServiceSettings.EnableBotAccountCreation',
Expand All @@ -3408,11 +3429,11 @@ export default {
},
{
type: Constants.SettingsTypes.TYPE_BOOL,
key: 'ServiceSettings.EnableUserAccessTokens',
label: t('admin.service.userAccessTokensTitle'),
label_default: 'Enable User Access Tokens: ',
help_text: t('admin.service.userAccessTokensDescription'),
help_text_default: 'When true, users can create [user access tokens](!https://about.mattermost.com/default-user-access-tokens) for integrations in **Account Settings > Security**. They can be used to authenticate against the API and give full access to the account.\n\n To manage who can create personal access tokens or to search users by token ID, go to the **User Management > Users** page.',
key: 'ServiceSettings.DisableBotsWhenOwnerIsDeactivated',
label: t('admin.service.disableBotOwnerDeactivatedTitle'),
label_default: 'Disable bot accounts when owner is deactivated:',
help_text: t('admin.service.disableBotWhenOwnerIsDeactivated'),
help_text_default: 'When a user is deactivated, disables all bot accounts managed by the user. To re-enable bot accounts, go to **Integrations > Bot Accounts**.',
help_text_markdown: true,
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,19 @@ exports[`components/AdminSidebar should match snapshot 1`] = `
/>
<AdminSidebarSection
key="5"
name="integrations/bot_accounts"
parentLink=""
subsection={false}
title={
<FormattedMessage
defaultMessage="Bot Accounts"
id="admin.integrations.botAccounts"
values={Object {}}
/>
}
/>
<AdminSidebarSection
key="6"
name="integrations/gif"
parentLink=""
subsection={false}
Expand All @@ -525,7 +538,7 @@ exports[`components/AdminSidebar should match snapshot 1`] = `
}
/>
<AdminSidebarSection
key="6"
key="7"
name="integrations/cors"
parentLink=""
subsection={false}
Expand Down Expand Up @@ -1077,6 +1090,19 @@ exports[`components/AdminSidebar should match snapshot, not prevent the console
/>
<AdminSidebarSection
key="5"
name="integrations/bot_accounts"
parentLink=""
subsection={false}
title={
<FormattedMessage
defaultMessage="Bot Accounts"
id="admin.integrations.botAccounts"
values={Object {}}
/>
}
/>
<AdminSidebarSection
key="6"
name="integrations/gif"
parentLink=""
subsection={false}
Expand All @@ -1089,7 +1115,7 @@ exports[`components/AdminSidebar should match snapshot, not prevent the console
}
/>
<AdminSidebarSection
key="6"
key="7"
name="integrations/cors"
parentLink=""
subsection={false}
Expand Down Expand Up @@ -1641,6 +1667,19 @@ exports[`components/AdminSidebar should match snapshot, not render the plugin in
/>
<AdminSidebarSection
key="5"
name="integrations/bot_accounts"
parentLink=""
subsection={false}
title={
<FormattedMessage
defaultMessage="Bot Accounts"
id="admin.integrations.botAccounts"
values={Object {}}
/>
}
/>
<AdminSidebarSection
key="6"
name="integrations/gif"
parentLink=""
subsection={false}
Expand All @@ -1653,7 +1692,7 @@ exports[`components/AdminSidebar should match snapshot, not render the plugin in
}
/>
<AdminSidebarSection
key="6"
key="7"
name="integrations/cors"
parentLink=""
subsection={false}
Expand Down Expand Up @@ -2336,6 +2375,19 @@ exports[`components/AdminSidebar should match snapshot, with license (with all f
/>
<AdminSidebarSection
key="5"
name="integrations/bot_accounts"
parentLink=""
subsection={false}
title={
<FormattedMessage
defaultMessage="Bot Accounts"
id="admin.integrations.botAccounts"
values={Object {}}
/>
}
/>
<AdminSidebarSection
key="6"
name="integrations/gif"
parentLink=""
subsection={false}
Expand All @@ -2348,7 +2400,7 @@ exports[`components/AdminSidebar should match snapshot, with license (with all f
}
/>
<AdminSidebarSection
key="6"
key="7"
name="integrations/cors"
parentLink=""
subsection={false}
Expand Down Expand Up @@ -3019,6 +3071,19 @@ exports[`components/AdminSidebar should match snapshot, with license (without an
/>
<AdminSidebarSection
key="5"
name="integrations/bot_accounts"
parentLink=""
subsection={false}
title={
<FormattedMessage
defaultMessage="Bot Accounts"
id="admin.integrations.botAccounts"
values={Object {}}
/>
}
/>
<AdminSidebarSection
key="6"
name="integrations/gif"
parentLink=""
subsection={false}
Expand All @@ -3031,7 +3096,7 @@ exports[`components/AdminSidebar should match snapshot, with license (without an
}
/>
<AdminSidebarSection
key="6"
key="7"
name="integrations/cors"
parentLink=""
subsection={false}
Expand Down
4 changes: 4 additions & 0 deletions i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -680,6 +680,8 @@
"admin.image.storeDescription": "Storage system where files and image attachments are saved.\n \nSelecting \"Amazon S3\" enables fields to enter your Amazon credentials and bucket details.\n \nSelecting \"Local File System\" enables the field to specify a local file directory.",
"admin.image.storeLocal": "Local File System",
"admin.image.storeTitle": "File Storage System:",
"admin.integrations.botAccounts": "Bot Accounts",
"admin.integrations.botAccounts.title": "Bot Accounts",
"admin.integrations.cors": "CORS",
"admin.integrations.gif": "GIF (Beta)",
"admin.integrations.integrationManagement": "Integration Management",
Expand Down Expand Up @@ -1211,6 +1213,8 @@
"admin.service.corsTitle": "Enable cross-origin requests from:",
"admin.service.developerDesc": "When true, JavaScript errors are shown in a purple bar at the top of the user interface. Not recommended for use in production. ",
"admin.service.developerTitle": "Enable Developer Mode: ",
"admin.service.disableBotOwnerDeactivatedTitle": "Disable bot accounts when owner is deactivated:",
"admin.service.disableBotWhenOwnerIsDeactivated": "When a user is deactivated, disables all bot accounts managed by the user. To re-enable bot accounts, go to **Integrations > Bot Accounts**.",
"admin.service.enableBotAccountCreation": "When true, users can create bot accounts for integrations in **Integrations > Bot Accounts**. Bot accounts are similar to user accounts except they cannot be used to log in. See [documentation](https://mattermost.com/pl/default-bot-accounts) to learn more.",
"admin.service.enableBotTitle": "Enable Bot Account Creation: ",
"admin.service.enforceMfaDesc": "When true, [multi-factor authentication](!https://docs.mattermost.com/deployment/auth.html) is required for login. New users will be required to configure MFA on signup. Logged in users without MFA configured are redirected to the MFA setup page until configuration is complete.\n \nIf your system has users with login methods other than AD/LDAP and email, MFA must be enforced with the authentication provider outside of Mattermost.",
Expand Down