Skip to content

Commit

Permalink
[web] remove password change feature
Browse files Browse the repository at this point in the history
Summary:
This was discussed in [ENG-8070](https://linear.app/comm/issue/ENG-8070/regenerate-backup-on-every-password-change#comment-c64a499b)

Only the primary device should be able to change the password.

Perhaps there was some alternative to keep this for a while and disable this after the user migrated to Signed Device Lists (v2), but this is not easy and probably there is no need to complicate just to keep this screen for a ~month and then remove.

Test Plan: No option to change password in account settings screen

Reviewers: ashoat, varun

Reviewed By: ashoat

Subscribers: tomek

Differential Revision: https://phab.comm.dev/D14062
  • Loading branch information
xsanm committed Dec 3, 2024
1 parent 12c361f commit ff76ebb
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 375 deletions.
14 changes: 0 additions & 14 deletions web/settings/account-settings.css
Original file line number Diff line number Diff line change
Expand Up @@ -56,20 +56,6 @@
line-height: var(--line-height-text);
}

.passwordContainer {
display: flex;
}

.password {
align-items: center;
padding-right: 16px;
}

.editPasswordLink {
color: var(--text-background-tertiary-default);
cursor: pointer;
}

.preferencesContainer {
padding-top: 24px;
}
Expand Down
27 changes: 0 additions & 27 deletions web/settings/account-settings.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import {
import { useModalContext } from 'lib/components/modal-provider.react.js';
import SWMansionIcon from 'lib/components/swmansion-icon.react.js';
import { useStringForUser } from 'lib/hooks/ens-cache.js';
import { accountHasPassword } from 'lib/shared/account-utils.js';
import {
dmOperationSpecificationTypes,
type OutboundDMOperationSpecification,
Expand All @@ -32,7 +31,6 @@ import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
import css from './account-settings.css';
import AppearanceChangeModal from './appearance-change-modal.react.js';
import BackupTestRestoreModal from './backup-test-restore-modal.react.js';
import PasswordChangeModal from './password-change-modal.js';
import BlockListModal from './relationship/block-list-modal.react.js';
import FriendListModal from './relationship/friend-list-modal.react.js';
import TunnelbrokerMessagesScreen from './tunnelbroker-message-list.react.js';
Expand Down Expand Up @@ -80,11 +78,6 @@ function AccountSettings(): React.Node {
})();
}, []);

const showPasswordChangeModal = React.useCallback(
() => pushModal(<PasswordChangeModal />),
[pushModal],
);

const openFriendList = React.useCallback(
() => pushModal(<FriendListModal />),
[pushModal],
Expand All @@ -95,10 +88,6 @@ function AccountSettings(): React.Node {
[pushModal],
);

const isAccountWithPassword = useSelector(state =>
accountHasPassword(state.currentUserInfo),
);

const currentUserInfo = useSelector(state => state.currentUserInfo);
const stringForUser = useStringForUser(currentUserInfo);

Expand Down Expand Up @@ -181,21 +170,6 @@ function AccountSettings(): React.Node {
return null;
}

let changePasswordSection;
if (isAccountWithPassword) {
changePasswordSection = (
<li>
<span>Password</span>
<span className={css.passwordContainer}>
<span className={css.password}>******</span>
<a className={css.editPasswordLink} onClick={showPasswordChangeModal}>
<SWMansionIcon icon="edit-1" size={22} />
</a>
</span>
</li>
);
}

let experimentalLogOutSection;
if (isDev) {
experimentalLogOutSection = (
Expand Down Expand Up @@ -337,7 +311,6 @@ function AccountSettings(): React.Node {
</Button>
</li>
{experimentalLogOutSection}
{changePasswordSection}
<li>
<span>Friend List</span>
<Button variant="text" onClick={openFriendList}>
Expand Down
38 changes: 0 additions & 38 deletions web/settings/password-change-modal.css

This file was deleted.

Loading

0 comments on commit ff76ebb

Please sign in to comment.