fix: Hide unlinking SSO when OIDC is enforced

This commit is contained in:
Maksim Eltyshev
2026-01-26 22:21:27 +01:00
parent b2da1a5e18
commit 2c4369159b
2 changed files with 5 additions and 1 deletions

View File

@@ -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', {

View File

@@ -70,6 +70,10 @@ module.exports = {
}
}
if (sails.config.custom.oidcEnforced) {
lockedFieldNames.push('isSsoUser');
}
Object.assign(data, {
isDefaultAdmin,
lockedFieldNames,