File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
src/dstack/_internal/server/security Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -110,9 +110,10 @@ async def __call__(
110110
111111class ProjectMemberOrPublicAccess :
112112 """
113- Allows access to project details for:
114- 1. Project members (existing behavior)
115- 2. Any authenticated user if the project is public
113+ Allows access to project for:
114+ - Global admins
115+ - Project members
116+ - Any authenticated user if the project is public
116117 """
117118
118119 async def __call__ (
@@ -130,16 +131,13 @@ async def __call__(
130131 if project is None :
131132 raise error_not_found ()
132133
133- # Global admins always have access
134134 if user .global_role == GlobalRole .ADMIN :
135135 return user , project
136136
137- # Check if user is a project member
138137 project_role = get_user_project_role (user = user , project = project )
139138 if project_role is not None :
140139 return user , project
141140
142- # If not a member, check if project is public
143141 if project .is_public :
144142 return user , project
145143
You can’t perform that action at this time.
0 commit comments