diff --git a/web/react/components/admin_console/demote_own_role_modal.jsx b/web/react/components/admin_console/demote_own_role_modal.jsx
new file mode 100644
index 0000000000..63d4dca5cd
--- /dev/null
+++ b/web/react/components/admin_console/demote_own_role_modal.jsx
@@ -0,0 +1,91 @@
+// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved.
+// See License.txt for license information.
+
+import * as AsyncClient from '../../utils/async_client.jsx';
+import * as Client from '../../utils/client.jsx';
+const Modal = ReactBootstrap.Modal;
+import * as Utils from '../../utils/utils.jsx';
+
+export default class DemoteOwnRoleModal extends React.Component {
+ constructor(props) {
+ super(props);
+
+ this.doDemote = this.doDemote.bind(this);
+ this.doCancel = this.doCancel.bind(this);
+
+ this.state = {
+ serverError: null
+ };
+ }
+
+ doDemote() {
+ const data = {
+ user_id: this.props.user.id,
+ new_roles: this.props.role
+ };
+ console.log(JSON.stringify(data));
+
+ Client.updateRoles(data,
+ () => {
+ this.setState({serverError: null});
+ this.props.onModalSubmit();
+ },
+ (err) => {
+ this.setState({serverError: err.message});
+ }
+ );
+ }
+
+ doCancel() {
+ this.setState({serverError: null});
+ this.props.onModalDismissed();
+ }
+
+ render() {
+ let serverError = null;
+
+ if (this.state.serverError) {
+ serverError =
+ }
+
+ return (
+
+
+
{'Confirm demotion from System Admin role'}
+
+
+ If you demote yourself from the System Admin role and there is not another user with System Admin privileges, you'll need to re-assign a System Admin by accessing the Mattermost server through a terminal and running the following command.