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',
|
context: 'title',
|
||||||
})}
|
})}
|
||||||
</Menu.Item>
|
</Menu.Item>
|
||||||
{user.isSsoUser && !isCurrentUser && (
|
{user.isSsoUser && !user.lockedFieldNames.includes('isSsoUser') && !isCurrentUser && (
|
||||||
<Menu.Item className={styles.menuItem} onClick={handleUnlinkSsoClick}>
|
<Menu.Item className={styles.menuItem} onClick={handleUnlinkSsoClick}>
|
||||||
<Icon name="unlink" className={styles.menuItemIcon} />
|
<Icon name="unlink" className={styles.menuItemIcon} />
|
||||||
{t('action.unlinkSso', {
|
{t('action.unlinkSso', {
|
||||||
|
|||||||
@@ -70,6 +70,10 @@ module.exports = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (sails.config.custom.oidcEnforced) {
|
||||||
|
lockedFieldNames.push('isSsoUser');
|
||||||
|
}
|
||||||
|
|
||||||
Object.assign(data, {
|
Object.assign(data, {
|
||||||
isDefaultAdmin,
|
isDefaultAdmin,
|
||||||
lockedFieldNames,
|
lockedFieldNames,
|
||||||
|
|||||||
Reference in New Issue
Block a user