-
Notifications
You must be signed in to change notification settings - Fork 9
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
feat: allow staff to access detailed impacts from explorer. #878
Conversation
3337deb
to
71b6c66
Compare
5b5f79c
to
db0411d
Compare
ceb4f5d
to
e0f5487
Compare
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.
I’m trying to test it locally, but I have a strange behavior: once logged in, and the « Mon compte » menu displayed in the top right, if I refresh the page it seems that I am disconnected, the « Mon compte » link goes back to « Connexion ou inscription ». Do you see the same problem?
Yes and it also happens on production, so we should probably file a card about it :( |
It works fine on production for me, but not on this review app, that's pretty strange 🤔 |
@n1k0 the problem is with the local storage decoding. The |
Damn, good catch. I'll fix the bug in this PR but we should probably warn in some way that decoding has failed, for another PR. I'll file a card about that. |
5f6fce3
to
49ba6f7
Compare
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.
Awesome, LGTM!
@vjousse thanks! I'll wait for Camille's approval to land this patch. Meanwhile I filed an issue about the deserialization bug mentioned earlier: https://www.notion.so/Bug-d-codage-session-utilisateur-depuis-localStorage-8e135bd915a0423c89e67756f40074a1 |
@vjousse wait, actually scratch that, I'm gonna land the patch onto staging because I have a demo planned in 15 minutes 🤣 |
## [3.0.0](https://github.com/MTES-MCT/ecobalyse/compare/v2.7.1..v3.0.0) (2025-01-13) ### 🚀 Features - Generalize density, electricity, heat and waste process fields ([#855](#855)) - *(data)* Ensure consistent nullable alias field in all processes files. ([#862](#862)) - Add betagouv logo. ([#848](#848)) - *(data)* Unified, cross-domain processes file format. ([#866](#866)) - *(data)* Validate processes files against a JSON schema. ([#869](#869)) - *(data,textile)* Add trim process and components data. ([#824](#824)) - *(textile)* Implement trims. ([#873](#873)) - *(data,ui)* Add trims to more textile examples, render them in explorer ([#876](#876)) - Allow expanding trim details. ([#877](#877)) - Allow staff to access detailed impacts from explorer. ([#878](#878)) ### 🪲 Bug Fixes - *(food)* [**breaking**] Food processes identifiers are now UUIDs ([#844](#844)) - *(data)* [**breaking**] Update textile process ids to use UUID format ([#858](#858)) - Data pipeline with new UUIDs ([#857](#857)) - Fix api error with old versions ([#851](#851)) - Broken homepage after upgrading highcharts ([#863](#863)) - *(dev)* Fix npm ci error with `transcrypt` ([#870](#870)) - Correct data on trims ([#879](#879)) - Warn on session data decoding error. ([#884](#884)) - *(textile)* Apply durability to trims impacts. ([#886](#886)) - Update PEF score label. ([#887](#887)) ### 🚜 Refactor - Move textile step_usage field to categories. ([#850](#850)) - *(data)* Move textile process "correctif" to comment ([#852](#852)) - Add encrypted detailed impacts files to the source code ([#840](#840)) - Abstract components. ([#872](#872)) - Order json keys ([#871](#871)) ### 📚 Documentation - Fix openapi food examples ([#867](#867)) ### ⚙️ Miscellaneous Tasks - Increase API test timeout ([#853](#853)) - *(data)* Remove system_description process field. ([#859](#859)) - Upgrade dependencies, December 2024. ([#860](#860)) - Remove obsolete/unused info textile process field. ([#861](#861)) - *(data)* Merge PastoEco in a single file to speedup imports and fixed linking to AGB ([#833](#833)) - Fix score_history workflow for transcrypt ([#864](#864)) - Standardize number formatting across codebase ([#804](#804)) - Standardize tkm unit ([#868](#868)) - Remove obsolete pre-commit command. ([#874](#874)) - Update trim api parameter ordering. ([#875](#875)) - Remove data directory, now in `ecobalyse-data` repo ([#888](#888)) - Update crypto-related docs. ([#890](#890)) - *(security)* Upgrade django to >=5.1.4. ([#885](#885)) - Readd score_history ([#891](#891)) <!-- generated by git-cliff --> Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
🔧 Problem
Notion card
Now that detailed processes impacts are encrypted in the repo, there's no UI to browse them. Ecobalyse staff (team members) should be able to browser and navigate them easily from the web UI and CSV exports.
🍰 Solution
🚨 Points to watch/comments
staff
boolean by faking the auth endpoint response, but I suspect we could live with that anyway.🏝️ How to test
You need two accounts on Ecobalyse, one with the
is_staff
flag enabled, and the other one without it (note: your own personal existing team account probably has this flag enabled already). The account page features a note about this bit being enabled when connected on the platform:Then, check that: