-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MonitorExt] Mise en place de MonitorExt #1441
base: thomas/ajout-cerbere
Are you sure you want to change the base?
Conversation
frontend/src/features/map/index.tsx
Outdated
@@ -77,65 +77,65 @@ export function Map() { | |||
|
|||
{/* MAP */} | |||
{/* @ts-ignore */} | |||
<MeasurementLayer /> | |||
{isSuperUser && <MeasurementLayer />} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion : Regrouper les composants qui doivent vérifier qu'on doit etre SuperUser
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
non on ne peut pas car on doit passer les props de BaseMap, le fait d'ajouter <></>
empêche ça
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok mais on peut c'est possible d'avoir quelque chose dans le genre ?
{!isSuperUser ? <BaseMap>..</BaseMap> : <BaseMap></BaseMap>
Avec les layers qui vont bien dans chacun des cas ?
frontend/src/pages/Login.tsx
Outdated
@@ -27,7 +27,7 @@ export function Login() { | |||
return <Navigate to="/" /> | |||
} | |||
|
|||
if (auth?.isAuthenticated && isSuccess && user?.isSuperUser) { | |||
if (auth?.isAuthenticated && isSuccess && !user?.isSuperUser) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
praise: héhé
suggestion: Ajouter des tests e2e pour vérifier de ce que l'ont voit en lecture seule. (si c'est pas trop compliqué) |
1f0f6d9
to
0d40b59
Compare
Related Pull Requests & Issues