Skip to content

fix(vfolder): fallback system role creation on invitation acceptance#11886

Open
wali-reheman wants to merge 1 commit into
lablup:mainfrom
wali-reheman:fix/vfolder-invitation-fallback-system-role
Open

fix(vfolder): fallback system role creation on invitation acceptance#11886
wali-reheman wants to merge 1 commit into
lablup:mainfrom
wali-reheman:fix/vfolder-invitation-fallback-system-role

Conversation

@wali-reheman

Copy link
Copy Markdown

When accepting a vfolder invitation for a user without a SYSTEM role, the lookup now creates one as a fallback inside the transaction instead of failing with ObjectNotFound. This handles SSO-created accounts that may not have an RBAC role yet. Includes unit tests for both the existing-role path and the fallback-creation path.

When a user without a SYSTEM role accepts a vfolder invitation,
_get_user_role_id() now creates one as a fallback inside the existing
write transaction, instead of raising ObjectNotFound and rolling back.
This allows invitation acceptance to succeed for users (e.g. SSO-created
accounts) who may not yet have an RBAC system role.

Fixes backend.ai issue lablup#11885 (BA-6253).
@wali-reheman wali-reheman requested a review from a team as a code owner June 1, 2026 13:06
@cla-assistant

cla-assistant Bot commented Jun 1, 2026

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Comment thread src/ai/backend/manager/repositories/vfolder/repository.py
@github-actions

Copy link
Copy Markdown

This PR has had no activity for 14 days and has been marked as stale. It will be closed on 2026-07-02 (in 14 days) if no further activity occurs. Push a commit or leave a comment to keep it open.

@github-actions github-actions Bot added the stale label Jun 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants