Ajout d'une page 'Non autorisée' et redirection automatique vers celle ci en cas d'accès via un compte non autorisé
This commit is contained in:
37
client/src/components/UnauthorizedPage/UnauthorizedPage.tsx
Normal file
37
client/src/components/UnauthorizedPage/UnauthorizedPage.tsx
Normal file
@ -0,0 +1,37 @@
|
||||
import React, { FunctionComponent } from 'react';
|
||||
import { Config } from '../../config';
|
||||
import { Page } from '../Page';
|
||||
|
||||
export interface UnauthorizedPageProps {
|
||||
|
||||
}
|
||||
|
||||
export const UnauthorizedPage:FunctionComponent<UnauthorizedPageProps> = () => {
|
||||
return (
|
||||
<Page title="Non autorisé">
|
||||
<div className="container is-fluid">
|
||||
<section className="section">
|
||||
<div className="columns">
|
||||
<div className="column is-6 is-offset-3">
|
||||
<div className="message is-danger">
|
||||
<div className="message-header">
|
||||
<p><i className="fa fa-ban"></i> Non autorisé</p>
|
||||
</div>
|
||||
<div className="message-body">
|
||||
<p>Vous n'êtes pas autorisé à accéder à cette page.</p>
|
||||
<br />
|
||||
<p>Votre compte est peut être désactivé, votre adresse courriel ne fait peut être
|
||||
pas partie des domaines autorisés ou vous n'avez peut être pas les droits nécessaires pour effectuer cette opération.</p>
|
||||
<div className="has-text-centered mt-5">
|
||||
<a href={Config.logoutURL} className="is-warning button"><i className="fa fa-sign-out-alt"></i> Forcer la déconnexion</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</Page>
|
||||
);
|
||||
}
|
Reference in New Issue
Block a user