Merge pull request #17060 from overleaf/jel-password-linked-group-sso

[web] Prevent updating password for managed users linked to group SSO

GitOrigin-RevId: f40bba47575cfac1b1e42d3138112c0db4f7865c
This commit is contained in:
Jessica Lawshe
2024-02-20 09:06:06 +00:00
committed by Copybot
parent d5639794c2
commit f8094bbdb6
5 changed files with 34 additions and 2 deletions
@@ -183,6 +183,17 @@ describe('<PasswordSection />', function () {
await screen.findByText('Your old password is wrong')
})
it('shows message when user cannot use password log in', async function () {
window.metaAttributesCache.set('ol-cannot-change-password', true)
render(<PasswordSection />)
await screen.findByRole('heading', { name: 'Change Password' })
screen.getByText(
'You cant add or change your password because your group or organization uses',
{ exact: false }
)
screen.getByRole('link', { name: 'single sign-on (SSO)' })
})
})
function submitValidForm() {