Skip to content

fix(login): User accepting invite should not get permission error#5130

Merged
Bowrna merged 1 commit intofrappe:developfrom
Bowrna:accept_team_permission_error
Feb 18, 2026
Merged

fix(login): User accepting invite should not get permission error#5130
Bowrna merged 1 commit intofrappe:developfrom
Bowrna:accept_team_permission_error

Conversation

@Bowrna
Copy link
Contributor

@Bowrna Bowrna commented Feb 17, 2026

Validate the permission error that user gets when invited to another team

@codecov
Copy link

codecov bot commented Feb 17, 2026

Codecov Report

❌ Patch coverage is 0% with 14 lines in your changes missing coverage. Please review.
✅ Project coverage is 45.12%. Comparing base (d2624cb) to head (3492851).
⚠️ Report is 31 commits behind head on develop.

Files with missing lines Patch % Lines
press/api/account.py 0.00% 14 Missing ⚠️

❌ 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              
Flag Coverage Δ
dashboard 72.72% <ø> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Bowrna Bowrna merged commit 9d32796 into frappe:develop Feb 18, 2026
10 of 12 checks passed
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")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What scenario are we fixing here?
This might be dangerous.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants