17754: Avoids presenting account linking options whe LoginCluster is set. 17754-federated-acct-merge
authorLucas Di Pentima <lucas.dipentima@curii.com>
Fri, 18 Feb 2022 21:56:39 +0000 (18:56 -0300)
committerLucas Di Pentima <lucas.dipentima@curii.com>
Fri, 18 Feb 2022 21:56:39 +0000 (18:56 -0300)
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas.dipentima@curii.com>

src/views/link-account-panel/link-account-panel-root.tsx

index 9dc28d66b62697507c314110d3d82ef2c8e8b1b4..490e47dc68698e805ac91227e9d27adc38189906 100644 (file)
@@ -73,6 +73,18 @@ type LinkAccountPanelRootProps = LinkAccountPanelRootDataProps & LinkAccountPane
 export const LinkAccountPanelRoot = withStyles(styles)(
     ({ classes, targetUser, userToLink, status, isProcessing, error, startLinking, cancelLinking, linkAccount,
         remoteHostsConfig, hasRemoteHosts, selectedCluster, setSelectedCluster, localCluster, loginCluster }: LinkAccountPanelRootProps) => {
+
+        // If a LoginFederation is configured, the self-serve account linking is not
+        // currently available.
+        if (loginCluster !== "") {
+            return <Card className={classes.root}><CardContent>
+                <Grid container spacing={16}>
+                    <Grid item xs={12}>
+                        If you would like to link this account to another one, please contact your administrator.
+                    </Grid>
+                </Grid>
+            </CardContent></Card>;
+        }
         return <Card className={classes.root}><CardContent>
             { isProcessing && <Grid container item direction="column" alignContent="center" spacing={24}>
                 <Grid item>