-
-
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
New Data Model : Add an Organization table #332
Conversation
TODO :
=> fix e2e tests & client tests ✔️ |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #332 +/- ##
==========================================
- Coverage 88.49% 87.71% -0.78%
==========================================
Files 28 31 +3
Lines 643 741 +98
==========================================
+ Hits 569 650 +81
- Misses 74 91 +17
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
Thanks for the PR!
Just a few high-level questions:
- whether admin should below to an org
- what you should be able to access when you're not in the org of the specific resource
The simple version in my mind is that org = ID + name, and we add organization_id to users & cameras table. Either we can create a pyronear org or consider that a resource without an org ID is an admin. What do you think?
@frgfm about the pyronear org : it seems dangerous to me to say that an empty org has the admin right, it would be easy to imagine a bug conducting to the creation of an empty org that's why I don't really like this solution (but I might be wrong) furthermore we could imagine some development resources only available to pyronear member, in this case we could also have non admin user attached to the pyronear org. |
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.
Thanks for the edits! Lengthy review I'm sorry, but I did spot a few issues here and there + added some discussion questions
Let me know what you think 👍
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.
Thanks a lot! Feels almost finalized, just a few details 🙂
src/migrations/versions/2024_06_17_1521-4265426f8438_create_stes_table.py
Show resolved
Hide resolved
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.
Thanks for the edits! High-level comments:
- there are still problems with the value put in the JWT payload. This is important, we need to pay attention to this so we can trust it later
- the new CRUD method could be very simple extensions of
fetch_all
- watch out for search & replace all, you wanted to change 1-2 files, but you edited everything (and those should be reverted)
Almost there 🤞
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.
Looks like there is only a blank line + a rebase/merge to resolve conflicts and we're good to go :)
ca6fa83
to
4dda307
Compare
There are still conflicts, but it's strange the last commit on main was 18hours ago, while your last push is from 12 hours ago. Are you merging the last version of main? |
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.
Thanks a lot!
cf. #304 |
This table will be used to keep information about the owner of one or many cameras.
It will also be useful for resources access management (if you have access to the Site, you have access to all the resources linked to this site)