mirror of
https://github.com/plankanban/planka.git
synced 2026-07-15 21:48:11 +03:00
fix: Hide unlinking SSO when OIDC is enforced
This commit is contained in:
@@ -257,7 +257,7 @@ const ActionsStep = React.memo(({ userId, onClose }) => {
|
||||
context: 'title',
|
||||
})}
|
||||
</Menu.Item>
|
||||
{user.isSsoUser && !isCurrentUser && (
|
||||
{user.isSsoUser && !user.lockedFieldNames.includes('isSsoUser') && !isCurrentUser && (
|
||||
<Menu.Item className={styles.menuItem} onClick={handleUnlinkSsoClick}>
|
||||
<Icon name="unlink" className={styles.menuItemIcon} />
|
||||
{t('action.unlinkSso', {
|
||||
|
||||
@@ -70,6 +70,10 @@ module.exports = {
|
||||
}
|
||||
}
|
||||
|
||||
if (sails.config.custom.oidcEnforced) {
|
||||
lockedFieldNames.push('isSsoUser');
|
||||
}
|
||||
|
||||
Object.assign(data, {
|
||||
isDefaultAdmin,
|
||||
lockedFieldNames,
|
||||
|
||||
Reference in New Issue
Block a user