1
0
Fork 0
mirror of https://github.com/plankanban/planka.git synced 2025-07-27 17:19:43 +02:00

fix: OIDC finalization and refactoring

This commit is contained in:
Maksim Eltyshev 2023-10-17 19:18:19 +02:00
parent aae69cb5e4
commit 8e0c60f5be
70 changed files with 753 additions and 427 deletions

View file

@ -153,13 +153,15 @@ const ActionsStep = React.memo(
context: 'title',
})}
</Menu.Item>
<Menu.Item className={styles.menuItem} onClick={handleDeleteClick}>
{t('action.deleteUser', {
context: 'title',
})}
</Menu.Item>
</>
)}
{!user.isLockedAdmin && (
<Menu.Item className={styles.menuItem} onClick={handleDeleteClick}>
{t('action.deleteUser', {
context: 'title',
})}
</Menu.Item>
)}
</Menu>
</Popup.Content>
</>

View file

@ -18,6 +18,7 @@ const Item = React.memo(
phone,
isAdmin,
isLocked,
isLockedAdmin,
emailUpdateForm,
passwordUpdateForm,
usernameUpdateForm,
@ -47,7 +48,7 @@ const Item = React.memo(
<Table.Cell>{username || '-'}</Table.Cell>
<Table.Cell>{email}</Table.Cell>
<Table.Cell>
<Radio toggle checked={isAdmin} disabled={isLocked} onChange={handleIsAdminChange} />
<Radio toggle checked={isAdmin} disabled={isLockedAdmin} onChange={handleIsAdminChange} />
</Table.Cell>
<Table.Cell textAlign="right">
<ActionsPopup
@ -59,6 +60,7 @@ const Item = React.memo(
phone,
isAdmin,
isLocked,
isLockedAdmin,
emailUpdateForm,
passwordUpdateForm,
usernameUpdateForm,
@ -91,6 +93,7 @@ Item.propTypes = {
phone: PropTypes.string,
isAdmin: PropTypes.bool.isRequired,
isLocked: PropTypes.bool.isRequired,
isLockedAdmin: PropTypes.bool.isRequired,
/* eslint-disable react/forbid-prop-types */
emailUpdateForm: PropTypes.object.isRequired,
passwordUpdateForm: PropTypes.object.isRequired,

View file

@ -111,6 +111,7 @@ const UsersModal = React.memo(
phone={item.phone}
isAdmin={item.isAdmin}
isLocked={item.isLocked}
isLockedAdmin={item.isLockedAdmin}
emailUpdateForm={item.emailUpdateForm}
passwordUpdateForm={item.passwordUpdateForm}
usernameUpdateForm={item.usernameUpdateForm}