Skip to content

Commit f4351e6

Browse files
fix: Fixed WMS to remove JOB_ADMINISTRATOR from pilot properties
1 parent 290f7fc commit f4351e6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

diracx-routers/src/diracx/routers/jobs/access_policies.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
from fastapi import Depends, HTTPException, status
88

9-
from diracx.core.properties import JOB_ADMINISTRATOR, NORMAL_USER
9+
from diracx.core.properties import GENERIC_PILOT, JOB_ADMINISTRATOR, NORMAL_USER
1010
from diracx.db.sql import JobDB, SandboxMetadataDB
1111
from diracx.routers.access_policies import BaseAccessPolicy
1212
from diracx.routers.utils.users import AuthorizedUserInfo
@@ -61,6 +61,10 @@ async def policy(
6161
raise HTTPException(status.HTTP_403_FORBIDDEN)
6262
return
6363

64+
if GENERIC_PILOT in user_info.properties and action == ActionType.MANAGE:
65+
# Authorize pilots
66+
return
67+
6468
if JOB_ADMINISTRATOR in user_info.properties:
6569
return
6670

0 commit comments

Comments
 (0)