Skip to content

Commit

Permalink
feat: Allow privileged access for other's VFolder to superadmin (#1652)
Browse files Browse the repository at this point in the history
Backported-from: main
Backported-to: 23.09
  • Loading branch information
rapsealk authored and kyujin-cho committed Oct 24, 2023
1 parent 17f5285 commit 67cca48
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions changes/1652.feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Allow privileged access for other's VFolder to superadmin
3 changes: 3 additions & 0 deletions src/ai/backend/manager/models/vfolder.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,9 @@ async def query_accessible_vfolders(
if allowed_vfolder_types is None:
allowed_vfolder_types = ["user"] # legacy default

if user_role == UserRole.SUPERADMIN or user_role == "superadmin":
allow_privileged_access = True

vfolders_selectors = [
vfolders.c.name,
vfolders.c.id,
Expand Down

0 comments on commit 67cca48

Please sign in to comment.