...
 
Commits (2)
......@@ -162,6 +162,11 @@ exports[`components/AdminConsole should generate the routes 1`] = `
path="/authentication/gitlab"
render={[Function]}
/>
<Route
key="phabricator"
path="/phabricator"
render={[Function]}
/>
<Route
key="plugins/plugin_management"
path="/plugins/plugin_management"
......
......@@ -3280,14 +3280,14 @@ const AdminDefinition = {
url: 'phabricator',
title: t('admin.sidebar.phabricator'),
title_default: 'Phabricator',
isHidden: needsUtils.hasLicense,
isHidden: it.licensed,
schema: {
id: 'PhabricatorSettings',
name: t('admin.authentication.phabricator'),
name_default: 'Phabricator',
onConfigLoad: (config) => {
const newState = {};
newState['PhabricatorSettings.Url'] = config.PhabricatorSettings.UserApiEndpoint.replace('/api/v4/user', '');
newState['PhabricatorSettings.Url'] = config.PhabricatorSettings.UserApiEndpoint.replace('/api/user.whoami', '');
return newState;
},
onConfigSave: (config) => {
......@@ -3313,7 +3313,7 @@ const AdminDefinition = {
help_text: t('admin.phabricator.clientIdDescription'),
help_text_default: 'Obtain this value via the instructions above for logging into Phabricator.',
placeholder: t('admin.phabricator.clientIdExample'),
placeholder_default: 'E.g.: "jcuS8PuvcpGhpgHhlcpT1Mx42pnqMxQY"',
placeholder_default: 'E.g.: "PHID-OASC-xxxxxxxxxxxxxxxx"',
isDisabled: it.stateIsFalse('PhabricatorSettings.Enable'),
},
......@@ -3403,7 +3403,7 @@ const AdminDefinition = {
}
newState['GitLabSettings.Url'] = config.GitLabSettings.UserApiEndpoint.replace('/api/v4/user', '');
newState['PhabricatorSettings.Url'] = config.PhabricatorSettings.UserApiEndpoint.replace('/api/v4/user', '');
newState['PhabricatorSettings.Url'] = config.PhabricatorSettings.UserApiEndpoint.replace('/api/user.whoami', '');
return newState;
},
onConfigSave: (config) => {
......@@ -3418,7 +3418,7 @@ const AdminDefinition = {
newConfig.Office365Settings.Enable = false;
newConfig.GoogleSettings.Enable = false;
newConfig.GitLabSettings.UserApiEndpoint = config.GitLabSettings.Url.replace(/\/$/, '') + '/api/v4/user';
newConfig.PhabricatorSettings.UserApiEndpoint = config.PhabricatorSettings.Url.replace(/\/$/, '') + '/api/v4/user';
newConfig.PhabricatorSettings.UserApiEndpoint = config.PhabricatorSettings.Url.replace(/\/$/, '') + '/api/user.whoami';
if (config.oauthType === Constants.GITLAB_SERVICE) {
newConfig.GitLabSettings.Enable = true;
......
......@@ -526,20 +526,6 @@ exports[`components/AdminSidebar Plugins should match snapshot 1`] = `
/>
}
/>
<AdminSidebarSection
key="16"
name="phabricator"
parentLink=""
subsection={false}
title={
<FormattedMessage
defaultMessage="Phabricator"
id="admin.sidebar.phabricator"
values={Object {}}
/>
}
/>
</AdminSidebarCategory>
<AdminSidebarCategory
icon="fa-shield"
......@@ -619,6 +605,19 @@ exports[`components/AdminSidebar Plugins should match snapshot 1`] = `
/>
}
/>
<AdminSidebarSection
key="10"
name="phabricator"
parentLink=""
subsection={false}
title={
<FormattedMessage
defaultMessage="Phabricator"
id="admin.sidebar.phabricator"
values={Object {}}
/>
}
/>
</AdminSidebarCategory>
<AdminSidebarCategory
icon="fa-plug"
......@@ -1142,19 +1141,6 @@ exports[`components/AdminSidebar should match snapshot 1`] = `
/>
}
/>
<AdminSidebarSection
key="16"
name="authentication/phabricator"
parentLink=""
subsection={false}
title={
<FormattedMessage
defaultMessage="Phabricator"
id="admin.sidebar.phabricator"
values={Object {}}
/>
}
/>
</AdminSidebarCategory>
<AdminSidebarCategory
icon="fa-shield"
......@@ -1234,6 +1220,19 @@ exports[`components/AdminSidebar should match snapshot 1`] = `
/>
}
/>
<AdminSidebarSection
key="10"
name="phabricator"
parentLink=""
subsection={false}
title={
<FormattedMessage
defaultMessage="Phabricator"
id="admin.sidebar.phabricator"
values={Object {}}
/>
}
/>
</AdminSidebarCategory>
<AdminSidebarCategory
icon="fa-plug"
......@@ -1639,19 +1638,6 @@ exports[`components/AdminSidebar should match snapshot, not prevent the console
/>
}
/>
<AdminSidebarSection
key="16"
name="authentication/phabricator"
parentLink=""
subsection={false}
title={
<FormattedMessage
defaultMessage="Phabricator"
id="admin.sidebar.phabricator"
values={Object {}}
/>
}
/>
</AdminSidebarCategory>
<AdminSidebarCategory
icon="fa-cogs"
......@@ -1849,6 +1835,19 @@ exports[`components/AdminSidebar should match snapshot, not prevent the console
/>
}
/>
<AdminSidebarSection
key="10"
name="phabricator"
parentLink=""
subsection={false}
title={
<FormattedMessage
defaultMessage="Phabricator"
id="admin.sidebar.phabricator"
values={Object {}}
/>
}
/>
</AdminSidebarCategory>
<AdminSidebarCategory
icon="fa-plug"
......@@ -2444,6 +2443,19 @@ exports[`components/AdminSidebar should match snapshot, not render the plugin in
/>
}
/>
<AdminSidebarSection
key="10"
name="phabricator"
parentLink=""
subsection={false}
title={
<FormattedMessage
defaultMessage="Phabricator"
id="admin.sidebar.phabricator"
values={Object {}}
/>
}
/>
</AdminSidebarCategory>
<AdminSidebarCategory
icon="fa-plug"
......@@ -3184,7 +3196,7 @@ exports[`components/AdminSidebar should match snapshot, with license (with all f
}
/>
<AdminSidebarSection
key="10"
key="11"
name="authentication/oauth"
parentLink=""
subsection={false}
......@@ -3197,7 +3209,7 @@ exports[`components/AdminSidebar should match snapshot, with license (with all f
}
/>
<AdminSidebarSection
key="11"
key="12"
name="authentication/guest_access"
parentLink=""
subsection={false}
......@@ -3911,7 +3923,7 @@ exports[`components/AdminSidebar should match snapshot, with license (without an
}
/>
<AdminSidebarSection
key="10"
key="11"
name="authentication/oauth"
parentLink=""
subsection={false}
......@@ -3924,7 +3936,7 @@ exports[`components/AdminSidebar should match snapshot, with license (without an
}
/>
<AdminSidebarSection
key="11"
key="12"
name="authentication/guest_access"
parentLink=""
subsection={false}
......
......@@ -141,6 +141,21 @@ exports[`components/error_page/ErrorMessage should match snapshot, oauth_missing
}
/>
</p>
<p>
<FormattedMessage
defaultMessage="For {link} please make sure you followed the setup instructions."
id="error.oauth_missing_code.phabricator"
values={
Object {
"link": <ErrorLink
defaultMessage="Phabricator"
messageId="error.oauth_missing_code.phabricator.link"
url="https://docs.mattermost.com/deployment/sso-phabricator.html"
/>,
}
}
/>
</p>
<p>
<FormattedMessage
defaultMessage="If you reviewed the above and are still having trouble with configuration, you may post in our {link} where we'll be happy to help with issues during setup."
......
......@@ -71,7 +71,7 @@ exports[`components/SignupController should match snapshot for addUserToTeamFrom
id="signup_user_completed.haveAccount"
values={Object {}}
/>
<Link
to="/login?id=ppni7a9t87fn3j4d56rwocdctc"
>
......@@ -164,24 +164,6 @@ exports[`components/SignupController should match snapshot for all signup option
</span>
</span>
</a>
</div>
<span
className="color--light"
>
<FormattedMessage
defaultMessage="Already have an account?"
id="signup_user_completed.haveAccount"
values={Object {}}
/>
<Link
to="/login"
>
<FormattedMessage
defaultMessage="Click here to sign in."
id="signup_user_completed.signIn"
values={Object {}}
/>
</Link>
<a
className="btn btn-custom-login btn--full phabricator"
href="/oauth/phabricator/signup"
......@@ -209,7 +191,7 @@ exports[`components/SignupController should match snapshot for all signup option
id="signup_user_completed.haveAccount"
values={Object {}}
/>
<Link
to="/login"
>
......@@ -399,7 +381,7 @@ exports[`components/SignupController should match snapshot for all signup option
id="signup_user_completed.haveAccount"
values={Object {}}
/>
<Link
to="/login"
>
......
......@@ -210,6 +210,7 @@ export default class UserSettingsDisplay extends React.Component {
firstOption,
secondOption,
thirdOption,
fourthOption,
description,
disabled,
} = props;
......
This diff is collapsed.