Repository navigation
feat(backend): Add user profile - #9116
Conversation
…feat(backend)-Add-user-profile
✅ Deploy Preview for inventree-web-pui-preview canceled.
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #9116 +/- ##
==========================================
+ Coverage 86.08% 86.17% +0.09%
==========================================
Files 1182 1187 +5
Lines 52177 52449 +272
Branches 2187 2212 +25
==========================================
+ Hits 44916 45200 +284
+ Misses 6706 6690 -16
- Partials 555 559 +4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…feat(backend)-Add-user-profile
|
@SchrodingersGat thank you for the review - I have addressed the issues you raised. |
Yeah, that makes sense, happy for that addition :) |
|
@SchrodingersGat done! |
|
@matmair still looks like the profile settings cannot be edited by non-admin users: |
|
should be fixed now |
|
@matmair nice work here, thanks for making the fixes. This is a great new feature :) |
* Add user profile * fix choice set * ensure primary_group is valid * add missing migrations * fix tests * merge migrations * add migration test * add new model to ruleset * ensure changed to the m2m conenction also validate primary grups * move signals * fix import? * patch user language through * use set methods correctly * bump api * refactoring to make debugging and extending easier * fix dum recurrsion problem * fix user pk lookup * rename migration * add user and group page * cleanup * add hoverCard for user / owner / group render * include owner_model in owner responses * move user serializers to users * add profile to list * add brief serializer for profiles * ensure profile is present in most apis * extend rendered data * store and observe langauge in profile * reduce unneeded complexity * enable access to full profle (including internal fields) in me serializer * move theme to a single object * persist theme settings * fix radius lookup * remove debug message * fix filter * remove unused field * remove image fields * add setting to control showing profiles * fix settings * update test * fix theme reload * Add contact UI * Add profile edit screen * fix test * Add testing for user theme panel * fix var name * complete coverage of theme * Add test for new pages * make test more reliable in strict mode * remove step * fix ref * add verbose names * fix used setting * extend tests * fix permissions * fix lookup * use lookup to enuse ursls stay valid * update migrations * Add position field * fix permissions
* increase character limits on all link fields to 2000 * update test to still trigger * Don't fail when diff is too big for echo (#9205) * Reduce severity of error message (#9209) - Currently flooding sentry.io with reports * Disable pagination for ConfigList class (#9210) * [API] Auth login error (#9212) Fixes #9211 * [UI] Table Update (#9220) - Retain user selection for pageSize * renumber migrations after merge from master * Remove quick actions (#9222) * Remove placeholder components - No function - Cleanup for 1.0.0 * Remove Placeholder.tsx * feat(backend): Add user profile (#9116) * Add user profile * fix choice set * ensure primary_group is valid * add missing migrations * fix tests * merge migrations * add migration test * add new model to ruleset * ensure changed to the m2m conenction also validate primary grups * move signals * fix import? * patch user language through * use set methods correctly * bump api * refactoring to make debugging and extending easier * fix dum recurrsion problem * fix user pk lookup * rename migration * add user and group page * cleanup * add hoverCard for user / owner / group render * include owner_model in owner responses * move user serializers to users * add profile to list * add brief serializer for profiles * ensure profile is present in most apis * extend rendered data * store and observe langauge in profile * reduce unneeded complexity * enable access to full profle (including internal fields) in me serializer * move theme to a single object * persist theme settings * fix radius lookup * remove debug message * fix filter * remove unused field * remove image fields * add setting to control showing profiles * fix settings * update test * fix theme reload * Add contact UI * Add profile edit screen * fix test * Add testing for user theme panel * fix var name * complete coverage of theme * Add test for new pages * make test more reliable in strict mode * remove step * fix ref * add verbose names * fix used setting * extend tests * fix permissions * fix lookup * use lookup to enuse ursls stay valid * update migrations * Add position field * fix permissions * Fix font size in location column (#9230) * [WIP] Background reports (#9199) * Update report generation progress * Add shim task for offloading report printing * Cleanup * Add detail endpoints for label and report outputs * Display report printing progress in UI * Implement similar for label printing * Reduce output for CI * Add plugin slug * Bump API version * Ensure it works with machine printing * Fix null comparison * Fix SKU link * Update playwright tests * Massively reduce log output when printing * handle null values in existing db data * fix test to pass at max character limit again --------- Co-authored-by: Matthias Mair <[email protected]> Co-authored-by: Oliver <[email protected]> Co-authored-by: Joe Rogers <[email protected]>
|
@jacobfelknor would you be interested in getting this integrated with the LDAP sync? I have some ideas but would need a user/admin to hash some things out from the consumer side. |
|
I'm happy to take a look. It will probably be a few days before I can commit some time to it |
|
Great; No time pressure whatsoever on this issue.
|
|
Sorry for the delay on this, but I'm hoping to have some time to take a look over the next couple days |
|
@matmair alright, to answer your questions
I think the minimal set of name, active, and status message would be all I need/expect. I can see how having job title/location would be helpful for large organizations, so that makes sense too if you'd like it. I do like adding whether the user is an administrator and perhaps the primary group if set.
I tend to follow GitLab's example on these kinds of questions. They keep it pretty simple. They obtain email, name, and group membership from LDAP. Only the email address is locked (since that is the login method). It has a setting for whether users can change their Display Name. Everything else in the user profile (job title, location, etc) can be edited freely and isn't populated directly from LDAP I have noticed that right now in InvenTree the email from LDAP is attached to the Django user object, but doesn't get populated in the profile email addresses. I think this is the biggest deal for our instance moving forward. I think I can add this with the django_auth_ldap.backend.populate_user signal |
|
Thank you for your feedback, I will file a PR to sync these fields |

This PR:
UI for "normal" users to discover users and groups




Hover for user / owner / Group Pill

To address in later PRs:
Closes invenhost#107
Closes invenhost#117
Closes #7528