fix(login): User accepting invite should not get permission error#5130
fix(login): User accepting invite should not get permission error#5130Bowrna merged 1 commit intofrappe:developfrom
Conversation
Codecov Report❌ Patch coverage is
❌ Your patch status has failed because the patch coverage (0.00%) is below the target coverage (75.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## develop #5130 +/- ##
===========================================
- Coverage 45.14% 45.12% -0.03%
===========================================
Files 848 848
Lines 68121 68151 +30
Branches 283 282 -1
===========================================
- Hits 30754 30750 -4
- Misses 37339 37373 +34
Partials 28 28
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:
|
| return team_doc.create_user_for_member(first_name, last_name, email, password, role, press_roles) | ||
| current_user = frappe.session.user | ||
| try: | ||
| frappe.set_user("Administrator") |
There was a problem hiding this comment.
What scenario are we fixing here?
This might be dangerous.
There was a problem hiding this comment.
@BreadGenie Doing this because one of the user was facing permission error, when they want to join using invitation. The invitee user already is part of different team and they don't have permission to read the team doc and are not able to accept invite. So followed the same steps of elevating permission like how we do in setup account. Let me know if this is ok or i will see a different approach to handle this case.
Validate the permission error that user gets when invited to another team